Re: What micros do you actually hate to work with?
- From: "Isaac Bosompem" <x86asm@xxxxxxxxx>
- Date: 16 Oct 2006 18:52:44 -0700
ammonton@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
Isaac Bosompem <x86asm@xxxxxxxxx> wrote:
I used the O2 switch for optimization. Hope this helps. Seems like VS
.NET did a better job.
What do you get when optimizing for size (GCC and VS)? Optimizing for
speed on x86 can produce rather verbose code.
-a
Here is the output of VS .NET optimized for size. I will test for GCC a
bit later.
Shorter code:
00000 8b 4c 24 04 mov ecx, DWORD PTR _a$[esp-4]
00004 85 c9 test ecx, ecx
00006 8b 44 24 08 mov eax, DWORD PTR _b$[esp-4]
0000a 75 06 jne SHORT $L1429
0000c 85 c0 test eax, eax
0000e 75 15 jne SHORT $L1428
; Line 607
00010 40 inc eax
; Line 627
00011 c3 ret 0
$L1429:
; Line 610
00012 85 c0 test eax, eax
00014 75 0b jne SHORT $L1538
; Line 611
00016 8b c1 mov eax, ecx
; Line 627
00018 c3 ret 0
$L1539:
; Line 618
00019 73 04 jae SHORT $L1437
; Line 619
0001b 2b c1 sub eax, ecx
; Line 620
0001d eb 02 jmp SHORT $L1538
$L1437:
; Line 621
0001f 2b c8 sub ecx, eax
$L1538:
; Line 616
00021 3b c8 cmp ecx, eax
00023 75 f4 jne SHORT $L1539
$L1428:
; Line 627
00025 c3 ret 0
Again not to confuse anyone, this is Intel syntax (dest, src)
-Isaac
.
- References:
- Re: What micros do you actually hate to work with?
- From: ammonton
- Re: What micros do you actually hate to work with?
- From: Wilco Dijkstra
- Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan
- Re: What micros do you actually hate to work with?
- From: Wilco Dijkstra
- Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan
- Re: What micros do you actually hate to work with?
- From: Tauno Voipio
- Re: What micros do you actually hate to work with?
- From: Wilco Dijkstra
- Re: What micros do you actually hate to work with?
- From: Tauno Voipio
- Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan
- Re: What micros do you actually hate to work with?
- From: Tauno Voipio
- Re: What micros do you actually hate to work with?
- From: Isaac Bosompem
- Re: What micros do you actually hate to work with?
- From: ammonton
- Re: What micros do you actually hate to work with?
- Prev by Date: Re: MCUs other than ARMs
- Next by Date: Re: Interrupt driven UART
- Previous by thread: Re: What micros do you actually hate to work with?
- Next by thread: Re: What micros do you actually hate to work with?
- Index(es):
Relevant Pages
|