diff options
author | dim <dim@FreeBSD.org> | 2011-07-22 04:18:45 +0800 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-07-22 04:18:45 +0800 |
commit | f4041983fc5a56b6f2a37b427a9b6a499aec4b18 (patch) | |
tree | d1ff9c17f624295d738805a29e22bfd477ee5f9c /security/libgcrypt | |
parent | a9b69086cd5ad38cd70f9ce1b7de161176817d25 (diff) | |
download | freebsd-ports-graphics-f4041983fc5a56b6f2a37b427a9b6a499aec4b18.tar.gz freebsd-ports-graphics-f4041983fc5a56b6f2a37b427a9b6a499aec4b18.tar.zst freebsd-ports-graphics-f4041983fc5a56b6f2a37b427a9b6a499aec4b18.zip |
Building security/libgcrypt 1.5.0 with clang results in errors similar
to the following:
rijndael.c:846:46: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
"movdqa 0xa0(%%esi), %%xmm1\n\t"
^
<inline asm>:24:2: note: instantiated into assembly here
cmp $10, -80(%ebp)
^
This is because the 'cmp' instruction lacks a type suffix, and is thus
ambiguous. Fix this by changing these to 'cmpq'.
PR: ports/158994
Approved by: Hirohisa Yamaguchi <umq@ueo.co.jp> (maintainer)
Diffstat (limited to 'security/libgcrypt')
-rw-r--r-- | security/libgcrypt/files/patch-cipher-rijndael.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/security/libgcrypt/files/patch-cipher-rijndael.c b/security/libgcrypt/files/patch-cipher-rijndael.c new file mode 100644 index 00000000000..2394a29666d --- /dev/null +++ b/security/libgcrypt/files/patch-cipher-rijndael.c @@ -0,0 +1,61 @@ +--- cipher/rijndael.c.orig 2011-02-22 15:57:59.000000000 +0100 ++++ cipher/rijndael.c 2011-07-16 22:26:35.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" + "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" + "jz .Lenclast%=\n\t" + aesenc_xmm1_xmm0 + "movdqa 0xd0(%%esi), %%xmm1\n\t" +@@ -862,7 +862,7 @@ do_aesni_cfb (const RIJNDAEL_context *ct + "movdqu %[src], %%xmm1\n\t" /* Save input. */ + "pxor %%xmm1, %%xmm0\n\t" /* xmm0 = input ^ IV */ + +- "cmp $1, %[decrypt]\n\t" ++ "cmpq $1, %[decrypt]\n\t" + "jz .Ldecrypt_%=\n\t" + "movdqa %%xmm0, %[iv]\n\t" /* [encrypt] Store IV. */ + "jmp .Lleave_%=\n" +@@ -923,13 +923,13 @@ do_aesni_ctr (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" + "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" + "jz .Lenclast%=\n\t" + aesenc_xmm1_xmm0 + "movdqa 0xd0(%%esi), %%xmm1\n\t" +@@ -1050,7 +1050,7 @@ do_aesni_ctr_4 (const RIJNDAEL_context * + aesenc_xmm1_xmm3 + aesenc_xmm1_xmm4 + "movdqa 0xa0(%%esi), %%xmm1\n\t" +- "cmp $10, %[rounds]\n\t" ++ "cmpq $10, %[rounds]\n\t" + "jz .Lenclast%=\n\t" + aesenc_xmm1_xmm0 + aesenc_xmm1_xmm2 +@@ -1062,7 +1062,7 @@ do_aesni_ctr_4 (const RIJNDAEL_context * + aesenc_xmm1_xmm3 + aesenc_xmm1_xmm4 + "movdqa 0xc0(%%esi), %%xmm1\n\t" +- "cmp $12, %[rounds]\n\t" ++ "cmpq $12, %[rounds]\n\t" + "jz .Lenclast%=\n\t" + aesenc_xmm1_xmm0 + aesenc_xmm1_xmm2 |