Hello,

I can't understand asm so would you help to see things going well?
I changed crypto_init_cipher_ops() in crypt/cipher.c

# thanks to ``HOWTO find oops location''

    ops->cit_ivsize = crypto_tfm_alg_blocksize(tfm);
    align = crypto_tfm_alg_alignmask(tfm) + 1;
    asm("#1");
    addr = (unsigned long)crypto_tfm_ctx(tfm);
    asm("#2");
    addr = ALIGN(addr, align);
    asm("#3");
    addr += ALIGN(tfm->__crt_alg->cra_ctxsize, align);
    ops->cit_iv = (void *)addr;

The result of make crypt/cipher.s is as follows.
Is ``notl 32bit reg'' right? Is this a problem of gcc?

----

* gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)

.L132:
        movq    72(%r9), %rax
        movl    20(%rax), %eax
        movl    %eax, 8(%r8)
        movq    72(%r9), %rdi
        movl    28(%rdi), %esi
        leal    1(%rsi), %edx
#APP
        #1
#NO_APP
        leaq    80(%r9), %rcx
#APP
        #2
#NO_APP
        notl    %esi
        mov     %edx, %eax
        leaq    -1(%rax,%rcx), %rcx
        mov     %esi, %eax
        andq    %rax, %rcx
#APP
        #3
#NO_APP
        addl    24(%rdi), %edx

----

* gcc-3.4 (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-13)

.L131:
        movq    72(%rsi), %rax
        movl    20(%rax), %eax
        movl    %eax, 8(%r8)
        movq    72(%rsi), %rdi
        movl    28(%rdi), %ecx
        leal    1(%rcx), %edx
#APP
        #1
#NO_APP
        addq    $80, %rsi
#APP
        #2
#NO_APP
        mov     %edx, %eax
        notl    %ecx
        leaq    -1(%rax,%rsi), %rax
        andl    %ecx, %eax
#APP
        #3
#NO_APP
        addl    24(%rdi), %edx

----

* gcc-4.0 (GCC) 4.0.1 20050522 (prerelease) (Debian 4.0.0-9)

.L132:
        movq    72(%r9), %rax
        movl    20(%rax), %eax
        movl    %eax, 8(%r8)
        movq    72(%r9), %rdi
        movl    28(%rdi), %esi
        leal    1(%rsi), %edx
#APP
        #1
#NO_APP
        leaq    80(%r9), %rcx
#APP
        #2
#NO_APP
        notl    %esi
        mov     %edx, %eax
        leaq    -1(%rax,%rcx), %rcx
        mov     %esi, %eax
        andq    %rax, %rcx
#APP
        #3
#NO_APP
        addl    24(%rdi), %edx
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to