ext_21139 ([identity profile] spamsink.livejournal.com) wrote in [personal profile] vak 2007-05-24 10:02 pm (UTC)

А теперь берем старый добрый GCC 3.4.3 для x86_64, заменяем unsigned long на unsigned и получаем 15 команд, из них 9 в цикле:
rot13_hash:
        movl    $0, %edx
        decl    %esi
        cmpl    $-1, %esi
        je      .L6
.L4:
        movzbl  (%rdi), %eax
        addl    %eax, %edx
        incq    %rdi
        movl    %edx, %eax
        roll    $13, %eax
        subl    %eax, %edx
        decl    %esi
        cmpl    $-1, %esi
        jne     .L4
.L6:
        movl    %edx, %eax
        ret


Now what?

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org