#15658: System freeze after 3-rd icon when booting
-----------------------------+----------------------------
Reporter: X512 | Owner: nobody
Type: bug | Status: closed
Priority: normal | Milestone: Unscheduled
Component: System/Kernel | Version: R1/Development
Resolution: fixed | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: x86
-----------------------------+----------------------------
Comment (by X512):
Just for interest tested other compilers.
`setarch x86 gcc -c -O3 time.cpp`:
{{{
00000000 <system_time>:
0: 55 push ebp
1: 89 e5 mov ebp,esp
3: 57 push edi
4: 56 push esi
5: 53 push ebx
6: e8 fc ff ff ff call 7 <system_time+0x7>
b: 81 c3 02 00 00 00 add ebx,0x2
11: 83 ec 1c sub esp,0x1c
14: e8 fc ff ff ff call 15 <system_time+0x15>
19: 89 55 e4 mov DWORD PTR [ebp-28],edx
1c: 8b 93 00 00 00 00 mov edx,DWORD PTR [ebx]
22: 8b 32 mov esi,DWORD PTR [edx]
24: f7 e6 mul esi
26: 89 d0 mov eax,edx
28: 31 d2 xor edx,edx
2a: 89 c1 mov ecx,eax
2c: 8b 45 e4 mov eax,DWORD PTR [ebp-28]
2f: 89 d3 mov ebx,edx
31: f7 e6 mul esi
33: 01 c8 add eax,ecx
35: 11 da adc edx,ebx
37: 83 c4 1c add esp,0x1c
3a: 5b pop ebx
3b: 5e pop esi
3c: 5f pop edi
3d: 5d pop ebp
3e: c3 ret
}}}
`clang -c -O3 time.cpp`:
{{{
00000000 <system_time>:
0: 55 push ebp
1: 89 e5 mov ebp,esp
3: 57 push edi
4: 56 push esi
5: e8 fc ff ff ff call 6 <system_time+0x6>
a: 89 d1 mov ecx,edx
c: 8b 3d 00 00 00 00 mov edi,DWORD PTR ds:0x0
12: f7 e7 mul edi
14: 89 d6 mov esi,edx
16: 89 c8 mov eax,ecx
18: f7 e7 mul edi
1a: 01 f0 add eax,esi
1c: 83 d2 00 adc edx,0x0
1f: 5e pop esi
20: 5f pop edi
21: 5d pop ebp
22: c3 ret
}}}
Clang is the best, almost same as handwritten assembly.
--
Ticket URL: <https://dev.haiku-os.org/ticket/15658#comment:9>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.