diff options
author | dim <dim@FreeBSD.org> | 2011-07-26 14:54:46 +0800 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-07-26 14:54:46 +0800 |
commit | e51a987d24added40b1a11b44f08422dcba972a9 (patch) | |
tree | 358dbca41a6f7019d666ed58d33ce50b99aa6938 /security/libgcrypt | |
parent | f9e821d269a2a8ded3fa3920685fa781d8400fe5 (diff) | |
download | freebsd-ports-gnome-e51a987d24added40b1a11b44f08422dcba972a9.tar.gz freebsd-ports-gnome-e51a987d24added40b1a11b44f08422dcba972a9.tar.zst freebsd-ports-gnome-e51a987d24added40b1a11b44f08422dcba972a9.zip |
In the AES-NI inline assembly, change instances of 'cmpq' to 'cmpl'. I
had erroneously assumed this would only be compiled on amd64, but even
then a 64 bit compare is wrong. The variables referenced in the inline
assembly are all plain int, so 32 bit.
PR: ports/159147
Pointy hat to: dim
Requested by: Hirohisa Yamaguchi <umq@ueo.co.jp> (maintainer)
Diffstat (limited to 'security/libgcrypt')
-rw-r--r-- | security/libgcrypt/files/patch-cipher-rijndael.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/security/libgcrypt/files/patch-cipher-rijndael.c b/security/libgcrypt/files/patch-cipher-rijndael.c index 2394a29666d6..c93a3a13f347 100644 --- a/security/libgcrypt/files/patch-cipher-rijndael.c +++ b/security/libgcrypt/files/patch-cipher-rijndael.c @@ -1,18 +1,18 @@ --- cipher/rijndael.c.orig 2011-02-22 15:57:59.000000000 +0100 -+++ cipher/rijndael.c 2011-07-16 22:26:35.000000000 +0200 ++++ cipher/rijndael.c 2011-07-26 08:38:07.000000000 +0200 @@ -844,13 +844,13 @@ do_aesni_cfb (const RIJNDAEL_context *ct "movdqa 0x90(%%esi), %%xmm1\n\t" aesenc_xmm1_xmm0 "movdqa 0xa0(%%esi), %%xmm1\n\t" - "cmp $10, %[rounds]\n\t" -+ "cmpq $10, %[rounds]\n\t" ++ "cmpl $10, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 "movdqa 0xb0(%%esi), %%xmm1\n\t" aesenc_xmm1_xmm0 "movdqa 0xc0(%%esi), %%xmm1\n\t" - "cmp $12, %[rounds]\n\t" -+ "cmpq $12, %[rounds]\n\t" ++ "cmpl $12, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 "movdqa 0xd0(%%esi), %%xmm1\n\t" @@ -21,7 +21,7 @@ "pxor %%xmm1, %%xmm0\n\t" /* xmm0 = input ^ IV */ - "cmp $1, %[decrypt]\n\t" -+ "cmpq $1, %[decrypt]\n\t" ++ "cmpl $1, %[decrypt]\n\t" "jz .Ldecrypt_%=\n\t" "movdqa %%xmm0, %[iv]\n\t" /* [encrypt] Store IV. */ "jmp .Lleave_%=\n" @@ -30,14 +30,14 @@ aesenc_xmm1_xmm0 "movdqa 0xa0(%%esi), %%xmm1\n\t" - "cmp $10, %[rounds]\n\t" -+ "cmpq $10, %[rounds]\n\t" ++ "cmpl $10, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 "movdqa 0xb0(%%esi), %%xmm1\n\t" aesenc_xmm1_xmm0 "movdqa 0xc0(%%esi), %%xmm1\n\t" - "cmp $12, %[rounds]\n\t" -+ "cmpq $12, %[rounds]\n\t" ++ "cmpl $12, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 "movdqa 0xd0(%%esi), %%xmm1\n\t" @@ -46,7 +46,7 @@ aesenc_xmm1_xmm4 "movdqa 0xa0(%%esi), %%xmm1\n\t" - "cmp $10, %[rounds]\n\t" -+ "cmpq $10, %[rounds]\n\t" ++ "cmpl $10, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 aesenc_xmm1_xmm2 @@ -55,7 +55,7 @@ aesenc_xmm1_xmm4 "movdqa 0xc0(%%esi), %%xmm1\n\t" - "cmp $12, %[rounds]\n\t" -+ "cmpq $12, %[rounds]\n\t" ++ "cmpl $12, %[rounds]\n\t" "jz .Lenclast%=\n\t" aesenc_xmm1_xmm0 aesenc_xmm1_xmm2 |