mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
change asm labels to temporarily labels to fix clang compilation
This commit is contained in:
parent
d13329471e
commit
1568128356
18
aes.cpp
18
aes.cpp
@ -25,7 +25,7 @@ namespace crypto
|
|||||||
"movaps %%xmm3, %%xmm4 \n" \
|
"movaps %%xmm3, %%xmm4 \n" \
|
||||||
"pslldq $4, %%xmm4 \n" \
|
"pslldq $4, %%xmm4 \n" \
|
||||||
"pxor %%xmm4, %%xmm3 \n" \
|
"pxor %%xmm4, %%xmm3 \n" \
|
||||||
"pslldq $4, %%xmm4 \n" \
|
"pslldq $4, %%xmm4 \n" \
|
||||||
"pxor %%xmm4, %%xmm3 \n" \
|
"pxor %%xmm4, %%xmm3 \n" \
|
||||||
"pslldq $4, %%xmm4 \n" \
|
"pslldq $4, %%xmm4 \n" \
|
||||||
"pxor %%xmm4, %%xmm3 \n" \
|
"pxor %%xmm4, %%xmm3 \n" \
|
||||||
@ -163,7 +163,7 @@ namespace crypto
|
|||||||
__asm__
|
__asm__
|
||||||
(
|
(
|
||||||
"movups (%[iv]), %%xmm1 \n"
|
"movups (%[iv]), %%xmm1 \n"
|
||||||
"block_e: \n"
|
"1: \n"
|
||||||
"movups (%[in]), %%xmm0 \n"
|
"movups (%[in]), %%xmm0 \n"
|
||||||
"pxor %%xmm1, %%xmm0 \n"
|
"pxor %%xmm1, %%xmm0 \n"
|
||||||
EncryptAES256(sched)
|
EncryptAES256(sched)
|
||||||
@ -172,7 +172,7 @@ namespace crypto
|
|||||||
"add $16, %[in] \n"
|
"add $16, %[in] \n"
|
||||||
"add $16, %[out] \n"
|
"add $16, %[out] \n"
|
||||||
"dec %[num] \n"
|
"dec %[num] \n"
|
||||||
"jnz block_e; \n"
|
"jnz 1b \n"
|
||||||
"movups %%xmm1, (%[iv]) \n"
|
"movups %%xmm1, (%[iv]) \n"
|
||||||
:
|
:
|
||||||
: [iv]"r"(&m_LastBlock), [sched]"r"(m_ECBEncryption.GetKeySchedule ()),
|
: [iv]"r"(&m_LastBlock), [sched]"r"(m_ECBEncryption.GetKeySchedule ()),
|
||||||
@ -222,7 +222,7 @@ namespace crypto
|
|||||||
__asm__
|
__asm__
|
||||||
(
|
(
|
||||||
"movups (%[iv]), %%xmm1 \n"
|
"movups (%[iv]), %%xmm1 \n"
|
||||||
"block_d: \n"
|
"1: \n"
|
||||||
"movups (%[in]), %%xmm0 \n"
|
"movups (%[in]), %%xmm0 \n"
|
||||||
"movaps %%xmm0, %%xmm2 \n"
|
"movaps %%xmm0, %%xmm2 \n"
|
||||||
DecryptAES256(sched)
|
DecryptAES256(sched)
|
||||||
@ -232,7 +232,7 @@ namespace crypto
|
|||||||
"add $16, %[in] \n"
|
"add $16, %[in] \n"
|
||||||
"add $16, %[out] \n"
|
"add $16, %[out] \n"
|
||||||
"dec %[num] \n"
|
"dec %[num] \n"
|
||||||
"jnz block_d; \n"
|
"jnz 1b \n"
|
||||||
"movups %%xmm1, (%[iv]) \n"
|
"movups %%xmm1, (%[iv]) \n"
|
||||||
:
|
:
|
||||||
: [iv]"r"(&m_IV), [sched]"r"(m_ECBDecryption.GetKeySchedule ()),
|
: [iv]"r"(&m_IV), [sched]"r"(m_ECBDecryption.GetKeySchedule ()),
|
||||||
@ -289,7 +289,7 @@ namespace crypto
|
|||||||
EncryptAES256(sched_iv)
|
EncryptAES256(sched_iv)
|
||||||
"movups %%xmm0, (%[payload]) \n"
|
"movups %%xmm0, (%[payload]) \n"
|
||||||
// encrypt data, IV is xmm1
|
// encrypt data, IV is xmm1
|
||||||
"block_et: \n"
|
"1: \n"
|
||||||
"add $16, %[payload] \n"
|
"add $16, %[payload] \n"
|
||||||
"movups (%[payload]), %%xmm0 \n"
|
"movups (%[payload]), %%xmm0 \n"
|
||||||
"pxor %%xmm1, %%xmm0 \n"
|
"pxor %%xmm1, %%xmm0 \n"
|
||||||
@ -297,7 +297,7 @@ namespace crypto
|
|||||||
"movaps %%xmm0, %%xmm1 \n"
|
"movaps %%xmm0, %%xmm1 \n"
|
||||||
"movups %%xmm0, (%[payload]) \n"
|
"movups %%xmm0, (%[payload]) \n"
|
||||||
"dec %[num] \n"
|
"dec %[num] \n"
|
||||||
"jnz block_et; \n"
|
"jnz 1b \n"
|
||||||
:
|
:
|
||||||
: [sched_iv]"r"(m_IVEncryption.GetKeySchedule ()), [sched_l]"r"(m_LayerEncryption.GetKeySchedule ()),
|
: [sched_iv]"r"(m_IVEncryption.GetKeySchedule ()), [sched_l]"r"(m_LayerEncryption.GetKeySchedule ()),
|
||||||
[payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes
|
[payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes
|
||||||
@ -324,7 +324,7 @@ namespace crypto
|
|||||||
DecryptAES256(sched_iv)
|
DecryptAES256(sched_iv)
|
||||||
"movups %%xmm0, (%[payload]) \n"
|
"movups %%xmm0, (%[payload]) \n"
|
||||||
// decrypt data, IV is xmm1
|
// decrypt data, IV is xmm1
|
||||||
"block_dt: \n"
|
"1: \n"
|
||||||
"add $16, %[payload] \n"
|
"add $16, %[payload] \n"
|
||||||
"movups (%[payload]), %%xmm0 \n"
|
"movups (%[payload]), %%xmm0 \n"
|
||||||
"movaps %%xmm0, %%xmm2 \n"
|
"movaps %%xmm0, %%xmm2 \n"
|
||||||
@ -333,7 +333,7 @@ namespace crypto
|
|||||||
"movups %%xmm0, (%[payload]) \n"
|
"movups %%xmm0, (%[payload]) \n"
|
||||||
"movaps %%xmm2, %%xmm1 \n"
|
"movaps %%xmm2, %%xmm1 \n"
|
||||||
"dec %[num] \n"
|
"dec %[num] \n"
|
||||||
"jnz block_dt; \n"
|
"jnz 1b \n"
|
||||||
:
|
:
|
||||||
: [sched_iv]"r"(m_IVDecryption.GetKeySchedule ()), [sched_l]"r"(m_LayerDecryption.GetKeySchedule ()),
|
: [sched_iv]"r"(m_IVDecryption.GetKeySchedule ()), [sched_l]"r"(m_LayerDecryption.GetKeySchedule ()),
|
||||||
[payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes
|
[payload]"r"(payload), [num]"r"(63) // 63 blocks = 1008 bytes
|
||||||
|
Loading…
Reference in New Issue
Block a user