diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-10-22 09:13:22 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-29 15:15:20 +0300 |
commit | aebd1fb45c622e9a2b06fb70665d084d3a8d6c78 (patch) | |
tree | bbaa2fbe8031777db50609e15349c1f35344e10f /arch/powerpc/crypto/sha1-powerpc-asm.S | |
parent | e012c499985c608c936410d8bab29d9596d62859 (diff) | |
download | linux-aebd1fb45c622e9a2b06fb70665d084d3a8d6c78.tar.xz |
powerpc: flexible GPR range save/restore macros
Introduce macros that operate on a (start, end) range of GPRs, which
reduces lines of code and need to do mental arithmetic while reading the
code.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211022061322.2671178-1-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/crypto/sha1-powerpc-asm.S')
-rw-r--r-- | arch/powerpc/crypto/sha1-powerpc-asm.S | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/crypto/sha1-powerpc-asm.S b/arch/powerpc/crypto/sha1-powerpc-asm.S index 23e248beff71..f0d5ed557ab1 100644 --- a/arch/powerpc/crypto/sha1-powerpc-asm.S +++ b/arch/powerpc/crypto/sha1-powerpc-asm.S @@ -125,8 +125,7 @@ _GLOBAL(powerpc_sha_transform) PPC_STLU r1,-INT_FRAME_SIZE(r1) - SAVE_8GPRS(14, r1) - SAVE_10GPRS(22, r1) + SAVE_GPRS(14, 31, r1) /* Load up A - E */ lwz RA(0),0(r3) /* A */ @@ -184,7 +183,6 @@ _GLOBAL(powerpc_sha_transform) stw RD(0),12(r3) stw RE(0),16(r3) - REST_8GPRS(14, r1) - REST_10GPRS(22, r1) + REST_GPRS(14, 31, r1) addi r1,r1,INT_FRAME_SIZE blr |