News for hackers. Stuff that matters.
Re:Just fixed a 20-year-old bug… by viraptor on Sunday August 28, 2011 @06:17PM (#2935156)
Strange, new gcc (4.4.4) produces a much nicer assembly for key1!=key2:

    .LFB0:
        .cfi_startproc
        xorl    %eax, %eax
        cmpq    %rsi, %rdi
        setne   %al
        ret
        .cfi_endproc
Clang 2.8 does something similar to your _compare (I expect new versions to be a bit better)
Re:Just fixed a 20-year-old bug… by andrewf on Sunday August 28, 2011 @06:29PM (#2935181)
Different calling conventions. The calling convention for my target (32-bit x86 Mac OS X) says that all arguments have to be passed in on the stack. For your 64-bit target, the arguments go into registers.
Re:Just fixed a 20-year-old bug… by ori_b on Sunday August 28, 2011 @07:17PM (#2935260)
You're comparing two different assembly languages and calling conventions. x64 != x86.
Re:Just fixed a 20-year-old bug… by viraptor on Sunday August 28, 2011 @09:06PM (#2935484)
You're right. It's been some time since I've looked at any intel-like assembly :)