2 Nov 2005 11:42
RE: jhc vs ghc and the surprising result involving ghc generatedassembly.
Simon Marlow <simonmar <at> microsoft.com>
2005-11-02 10:42:50 GMT
2005-11-02 10:42:50 GMT
On 01 November 2005 16:32, Florian Weimer wrote: > * Simon Marlow: > >> gcc started generating this rubbish around version 3.4, if I recall >> correctly. I've tried disabling various optimisations, but can't >> seem to convince gcc not to generate the extra jump. You don't get >> this from the native code generator, BTW. > > But the comparison is present in the C code. What do you want GCC to > do? I didn't mean to sound overly critical of gcc. But here's what I was complaining about - the code generated by gcc (3.4.x) is as follows: Main_zdwfac_info: .text .align 8 .text movq (%rbp), %rdx cmpq $1, %rdx jne .L2 movq 8(%rbp), %r13 leaq 16(%rbp), %rbp movq (%rbp), %rax .L4: jmp *%rax .L2: movq %rdx, %rax imulq 8(%rbp), %rax(Continue reading)
RSS Feed