aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/crypto/md5-asm.S
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-10-22 16:13:22 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2021-11-29 23:15:20 +1100
commitaebd1fb45c622e9a2b06fb70665d084d3a8d6c78 (patch)
treebbaa2fbe8031777db50609e15349c1f35344e10f /arch/powerpc/crypto/md5-asm.S
parentpowerpc/watchdog: help remote CPUs to flush NMI printk output (diff)
downloadlinux-dev-aebd1fb45c622e9a2b06fb70665d084d3a8d6c78.tar.xz
linux-dev-aebd1fb45c622e9a2b06fb70665d084d3a8d6c78.zip
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/md5-asm.S')
-rw-r--r--arch/powerpc/crypto/md5-asm.S10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/crypto/md5-asm.S b/arch/powerpc/crypto/md5-asm.S
index 948d100a2934..fa6bc440cf4a 100644
--- a/arch/powerpc/crypto/md5-asm.S
+++ b/arch/powerpc/crypto/md5-asm.S
@@ -38,15 +38,11 @@
#define INITIALIZE \
PPC_STLU r1,-INT_FRAME_SIZE(r1); \
- SAVE_8GPRS(14, r1); /* push registers onto stack */ \
- SAVE_4GPRS(22, r1); \
- SAVE_GPR(26, r1)
+ SAVE_GPRS(14, 26, r1) /* push registers onto stack */
#define FINALIZE \
- REST_8GPRS(14, r1); /* pop registers from stack */ \
- REST_4GPRS(22, r1); \
- REST_GPR(26, r1); \
- addi r1,r1,INT_FRAME_SIZE;
+ REST_GPRS(14, 26, r1); /* pop registers from stack */ \
+ addi r1,r1,INT_FRAME_SIZE
#ifdef __BIG_ENDIAN__
#define LOAD_DATA(reg, off) \