Commit 8f2e0239 authored by Michael Ellerman's avatar Michael Ellerman

selftests/powerpc: Don't save CR by default in asm helpers

Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore CR, but none of the selftests
tests touch non-volatile CR fields, so it's unnecessary to save them by
default.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-4-mpe@ellerman.id.au
parent 3c20a1d0
...@@ -59,14 +59,10 @@ ...@@ -59,14 +59,10 @@
mflr r0; \ mflr r0; \
std r0, STACK_FRAME_LR_POS(%r1); \ std r0, STACK_FRAME_LR_POS(%r1); \
stdu %r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); \ stdu %r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); \
mfcr r0; \
stw r0, STACK_FRAME_CR_POS(%r1); \
std %r2, STACK_FRAME_TOC_POS(%r1); std %r2, STACK_FRAME_TOC_POS(%r1);
#define POP_BASIC_STACK(_extra) \ #define POP_BASIC_STACK(_extra) \
ld %r2, STACK_FRAME_TOC_POS(%r1); \ ld %r2, STACK_FRAME_TOC_POS(%r1); \
lwz r0, STACK_FRAME_CR_POS(%r1); \
mtcr r0; \
addi %r1, %r1, (((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE); \ addi %r1, %r1, (((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE); \
ld r0, STACK_FRAME_LR_POS(%r1); \ ld r0, STACK_FRAME_LR_POS(%r1); \
mtlr r0; mtlr r0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment