From 1568128356134c4144b757efba253351becb32bb Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Sun, 7 Dec 2014 19:37:52 +0300 Subject: [PATCH] change asm labels to temporarily labels to fix clang compilation --- aes.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aes.cpp b/aes.cpp index 1626682c..39ff4c1e 100644 --- a/aes.cpp +++ b/aes.cpp @@ -25,7 +25,7 @@ namespace crypto "movaps %%xmm3, %%xmm4 \n" \ "pslldq $4, %%xmm4 \n" \ "pxor %%xmm4, %%xmm3 \n" \ - "pslldq $4, %%xmm4 \n" \ + "pslldq $4, %%xmm4 \n" \ "pxor %%xmm4, %%xmm3 \n" \ "pslldq $4, %%xmm4 \n" \ "pxor %%xmm4, %%xmm3 \n" \ @@ -163,7 +163,7 @@ namespace crypto __asm__ ( "movups (%[iv]), %%xmm1 \n" - "block_e: \n" + "1: \n" "movups (%[in]), %%xmm0 \n" "pxor %%xmm1, %%xmm0 \n" EncryptAES256(sched) @@ -172,7 +172,7 @@ namespace crypto "add $16, %[in] \n" "add $16, %[out] \n" "dec %[num] \n" - "jnz block_e; \n" + "jnz 1b \n" "movups %%xmm1, (%[iv]) \n" : : [iv]"r"(&m_LastBlock), [sched]"r"(m_ECBEncryption.GetKeySchedule ()), @@ -222,7 +222,7 @@ namespace crypto __asm__ ( "movups (%[iv]), %%xmm1 \n" - "block_d: \n" + "1: \n" "movups (%[in]), %%xmm0 \n" "movaps %%xmm0, %%xmm2 \n" DecryptAES256(sched) @@ -232,7 +232,7 @@ namespace crypto "add $16, %[in] \n" "add $16, %[out] \n" "dec %[num] \n" - "jnz block_d; \n" + "jnz 1b \n" "movups %%xmm1, (%[iv]) \n" : : [iv]"r"(&m_IV), [sched]"r"(m_ECBDecryption.GetKeySchedule ()), @@ -289,7 +289,7 @@ namespace crypto EncryptAES256(sched_iv) "movups %%xmm0, (%[payload]) \n" // encrypt data, IV is xmm1 - "block_et: \n" + "1: \n" "add $16, %[payload] \n" "movups (%[payload]), %%xmm0 \n" "pxor %%xmm1, %%xmm0 \n" @@ -297,7 +297,7 @@ namespace crypto "movaps %%xmm0, %%xmm1 \n" "movups %%xmm0, (%[payload]) \n" "dec %[num] \n" - "jnz block_et; \n" + "jnz 1b \n" : : [sched_iv]"r"(m_IVEncryption.GetKeySchedule ()), [sched_l]"r"(m_LayerEncryption.GetKeySchedule ()), [payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes @@ -324,7 +324,7 @@ namespace crypto DecryptAES256(sched_iv) "movups %%xmm0, (%[payload]) \n" // decrypt data, IV is xmm1 - "block_dt: \n" + "1: \n" "add $16, %[payload] \n" "movups (%[payload]), %%xmm0 \n" "movaps %%xmm0, %%xmm2 \n" @@ -333,7 +333,7 @@ namespace crypto "movups %%xmm0, (%[payload]) \n" "movaps %%xmm2, %%xmm1 \n" "dec %[num] \n" - "jnz block_dt; \n" + "jnz 1b \n" : : [sched_iv]"r"(m_IVDecryption.GetKeySchedule ()), [sched_l]"r"(m_LayerDecryption.GetKeySchedule ()), [payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes