Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security/nettle: fix build on powerpc64*
Due to the string "swap_mask" being replaced with the vector register, the assembly label pointing at the local data variable .swap_mask was being replaced as well, causing the local label to be named ".0", which the clang integrated assembler treats as a syntax error. Change the name to .swap_data. Submitted by: bdragon
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
security/nettle/patch-powerpc64-p8-aes-decrypt-internal.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- powerpc64/p8/aes-decrypt-internal.asm.orig 2021-04-03 16:33:37.883035000 -0500 | ||
+++ powerpc64/p8/aes-decrypt-internal.asm 2021-04-03 16:34:24.022307000 -0500 | ||
@@ -71,7 +71,7 @@ define(`FUNC_ALIGN', `5') | ||
PROLOGUE(_nettle_aes_decrypt) | ||
vxor ZERO,ZERO,ZERO | ||
|
||
- DATA_LOAD_VEC(swap_mask,.swap_mask,r5) | ||
+ DATA_LOAD_VEC(swap_mask,.swap_data,r5) | ||
|
||
subi ROUNDS,ROUNDS,1 | ||
srdi LENGTH,LENGTH,4 | ||
@@ -351,6 +351,6 @@ EPILOGUE(_nettle_aes_decrypt) | ||
|
||
.data | ||
.align 4 | ||
-.swap_mask: | ||
+.swap_data: | ||
IF_LE(`.byte 8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7') | ||
IF_BE(`.byte 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12') |
19 changes: 19 additions & 0 deletions
19
security/nettle/patch-powerpc64-p8-aes-encrypt-internal.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- powerpc64/p8/aes-encrypt-internal.asm.orig 2021-04-03 16:33:26.104735000 -0500 | ||
+++ powerpc64/p8/aes-encrypt-internal.asm 2021-04-03 16:34:43.805790000 -0500 | ||
@@ -63,7 +63,7 @@ define(`S7', `v9') | ||
|
||
define(`FUNC_ALIGN', `5') | ||
PROLOGUE(_nettle_aes_encrypt) | ||
- DATA_LOAD_VEC(swap_mask,.swap_mask,r5) | ||
+ DATA_LOAD_VEC(swap_mask,.swap_data,r5) | ||
|
||
subi ROUNDS,ROUNDS,1 | ||
srdi LENGTH,LENGTH,4 | ||
@@ -328,6 +328,6 @@ EPILOGUE(_nettle_aes_encrypt) | ||
|
||
.data | ||
.align 4 | ||
-.swap_mask: | ||
+.swap_data: | ||
IF_LE(`.byte 8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7') | ||
IF_BE(`.byte 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12') |