76 lines
1.7 KiB
Diff
76 lines
1.7 KiB
Diff
From 95d7ebbafaea628751e35d2ce1c4c5d2617ed5de Mon Sep 17 00:00:00 2001
|
|
From: Eric Richter <erichte@linux.ibm.com>
|
|
Date: Thu, 20 Jun 2024 13:43:57 -0500
|
|
Subject: [PATCH] powerpc64: remove use of m4_unquote in the load step for
|
|
sha256
|
|
|
|
By passing in the constant offset value into the LOAD macro, the use of
|
|
m4_unquote to calculate the correct constant GPR can be avoided,
|
|
improving readability.
|
|
|
|
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
|
|
---
|
|
powerpc64/p8/sha256-compress-n.asm | 36 +++++++++++++++---------------
|
|
1 file changed, 18 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/powerpc64/p8/sha256-compress-n.asm b/powerpc64/p8/sha256-compress-n.asm
|
|
index 4848461e..309db1fa 100644
|
|
--- a/powerpc64/p8/sha256-compress-n.asm
|
|
+++ b/powerpc64/p8/sha256-compress-n.asm
|
|
@@ -177,34 +177,34 @@ define(`EXTENDROUNDS', `
|
|
')
|
|
|
|
define(`LOAD', `
|
|
- IF_BE(`lxvw4x VSR(IV($1)), m4_unquote(TC`'eval(($1 % 4) * 4)), INPUT')
|
|
+ IF_BE(`lxvw4x VSR(IV($1)), $2, INPUT')
|
|
IF_LE(`
|
|
- lxvd2x VSR(IV($1)), m4_unquote(TC`'eval(($1 % 4) * 4)), INPUT
|
|
+ lxvd2x VSR(IV($1)), $2, INPUT
|
|
vperm IV($1), IV($1), IV($1), VT0
|
|
')
|
|
')
|
|
|
|
define(`DOLOADS', `
|
|
IF_LE(`DATA_LOAD_VEC(VT0, .load_swap, T1)')
|
|
- LOAD(0)
|
|
- LOAD(1)
|
|
- LOAD(2)
|
|
- LOAD(3)
|
|
+ LOAD(0, TC0)
|
|
+ LOAD(1, TC4)
|
|
+ LOAD(2, TC8)
|
|
+ LOAD(3, TC12)
|
|
addi INPUT, INPUT, 16
|
|
- LOAD(4)
|
|
- LOAD(5)
|
|
- LOAD(6)
|
|
- LOAD(7)
|
|
+ LOAD(4, TC0)
|
|
+ LOAD(5, TC4)
|
|
+ LOAD(6, TC8)
|
|
+ LOAD(7, TC12)
|
|
addi INPUT, INPUT, 16
|
|
- LOAD(8)
|
|
- LOAD(9)
|
|
- LOAD(10)
|
|
- LOAD(11)
|
|
+ LOAD(8, TC0)
|
|
+ LOAD(9, TC4)
|
|
+ LOAD(10, TC8)
|
|
+ LOAD(11, TC12)
|
|
addi INPUT, INPUT, 16
|
|
- LOAD(12)
|
|
- LOAD(13)
|
|
- LOAD(14)
|
|
- LOAD(15)
|
|
+ LOAD(12, TC0)
|
|
+ LOAD(13, TC4)
|
|
+ LOAD(14, TC8)
|
|
+ LOAD(15, TC12)
|
|
addi INPUT, INPUT, 16
|
|
')
|
|
|
|
--
|
|
GitLab
|
|
|