]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Rename macros ppc-aes-macros
authorNiels Möller <nisse@lysator.liu.se>
Sat, 20 Jan 2024 15:52:52 +0000 (16:52 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 20 Jan 2024 15:52:52 +0000 (16:52 +0100)
powerpc64/machine.m4
powerpc64/p8/aes-decrypt-internal.asm
powerpc64/p8/aes-encrypt-internal.asm

index a94fd61566940cb571bef393088f1d85c8464fc9..3a05e318a53456d693f5092709e45ca491a80ee0 100644 (file)
@@ -65,17 +65,17 @@ define(`INC_VR',`ifelse(substr($1,0,1),`v',
 `eval($2+$1)')')
 
 C Apply op x, x, y, for each x.
-C OP_YXX(OP, Y, X1, X2, ...)
-define(`OP_YXX',
+C OPN_XXY(OP, Y, X1, X2, ...)
+define(`OPN_XXY',
 `$1 $3, $3, $2
 ifelse(eval($# > 3), 1,
-`OP_YXX($1, $2, shift(shift(shift($@))))dnl
+`OPN_XXY($1, $2, shift(shift(shift($@))))dnl
 ')')
 
 C Apply op x, x, x, y, for each x.
-C OP_YXXX(OP, Y, X1, X2, ...)
-define(`OP_YXXX',
+C OPN_XXXY(OP, Y, X1, X2, ...)
+define(`OPN_XXXY',
 `$1 $3, $3, $3, $2
 ifelse(eval($# > 3), 1,
-`OP_YXXX($1, $2, shift(shift(shift($@))))dnl
+`OPN_XXXY($1, $2, shift(shift(shift($@))))dnl
 ')')
index 12179cbf248f8aa315037143f63e7360e3560700..1c33f2799feb18d95b6df86bfb7be5e4336a5223 100644 (file)
@@ -110,9 +110,9 @@ Lx8_loop:
  lxvd2x VSR(S6),r30,SRC
  lxvd2x VSR(S7),r31,SRC
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 
- OP_YXX(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
 
  mtctr ROUNDS
  li r10,0x10
@@ -120,16 +120,16 @@ IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 L8x_round_loop:
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vncipher, ZERO, S0, S1, S2, S3, S4, S5, S6, S7)
- OP_YXX(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vncipher, ZERO, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
  addi r10,r10,0x10
  bdnz L8x_round_loop
 
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vncipherlast, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vncipherlast, K, S0, S1, S2, S3, S4, S5, S6, S7)
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 
  stxvd2x VSR(S0),0,DST
  stxvd2x VSR(S1),r25,DST
@@ -171,9 +171,9 @@ L4x:
  addi   r9,r9,0x10
  lxvd2x VSR(S3),r9,SRC
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3)')
 
- OP_YXX(vxor, K, S0, S1, S2, S3)
+ OPN_XXY(vxor, K, S0, S1, S2, S3)
 
  mtctr ROUNDS
  li r10,0x10
@@ -181,16 +181,16 @@ IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
 L4x_round_loop:
  lxvd2x VSR(K),r10,KEYS
  vperm  K,K,K,SWAP_MASK
- OP_YXX(vncipher, ZERO, S0, S1, S2, S3)
- OP_YXX(vxor, K, S0, S1, S2, S3)
+ OPN_XXY(vncipher, ZERO, S0, S1, S2, S3)
+ OPN_XXY(vxor, K, S0, S1, S2, S3)
  addi   r10,r10,0x10
  bdnz  L4x_round_loop
 
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vncipherlast, K, S0, S1, S2, S3)
+ OPN_XXY(vncipherlast, K, S0, S1, S2, S3)
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3)')
 
  stxvd2x VSR(S0),0,DST
  li  r9,0x10
index cd959f9ee06fb1da91a846c3de156c04054e07e1..9ae8bc0e9836e8ee7b3ab7f4ff9b63ad09346412 100644 (file)
@@ -102,9 +102,9 @@ Lx8_loop:
  lxvd2x VSR(S6),r30,SRC
  lxvd2x VSR(S7),r31,SRC
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 
- OP_YXX(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vxor, K, S0, S1, S2, S3, S4, S5, S6, S7)
 
  mtctr ROUNDS
  li r10,0x10
@@ -112,15 +112,15 @@ IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 L8x_round_loop:
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vcipher, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vcipher, K, S0, S1, S2, S3, S4, S5, S6, S7)
  addi r10,r10,0x10
  bdnz L8x_round_loop
 
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vcipherlast, K, S0, S1, S2, S3, S4, S5, S6, S7)
+ OPN_XXY(vcipherlast, K, S0, S1, S2, S3, S4, S5, S6, S7)
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3,S4,S5,S6,S7)')
 
  stxvd2x VSR(S0),0,DST
  stxvd2x VSR(S1),r25,DST
@@ -162,9 +162,9 @@ L4x:
  addi   r9,r9,0x10
  lxvd2x VSR(S3),r9,SRC
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3)')
 
- OP_YXX(vxor, K, S0, S1, S2, S3)
+ OPN_XXY(vxor, K, S0, S1, S2, S3)
 
  mtctr ROUNDS
  li r10,0x10
@@ -172,15 +172,15 @@ IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
 L4x_round_loop:
  lxvd2x VSR(K),r10,KEYS
  vperm  K,K,K,SWAP_MASK
- OP_YXX(vcipher, K, S0, S1, S2, S3)
+ OPN_XXY(vcipher, K, S0, S1, S2, S3)
  addi   r10,r10,0x10
  bdnz  L4x_round_loop
 
  lxvd2x VSR(K),r10,KEYS
  vperm   K,K,K,SWAP_MASK
- OP_YXX(vcipherlast, K, S0, S1, S2, S3)
+ OPN_XXY(vcipherlast, K, S0, S1, S2, S3)
 
-IF_LE(`OP_YXXX(vperm, SWAP_MASK, S0,S1,S2,S3)')
+IF_LE(`OPN_XXXY(vperm, SWAP_MASK, S0,S1,S2,S3)')
 
  stxvd2x VSR(S0),0,DST
  li  r9,0x10