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

Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore r2 (TOC pointer), but none of the
selftests change r2, so it's unnecessary to save it by default.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-5-mpe@ellerman.id.au
This commit is contained in:
Michael Ellerman 2022-06-28 00:02:31 +10:00
Родитель 8f2e02394d
Коммит cfbc0723d1
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -58,11 +58,9 @@
#define PUSH_BASIC_STACK(_extra) \ #define PUSH_BASIC_STACK(_extra) \
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);
std %r2, STACK_FRAME_TOC_POS(%r1);
#define POP_BASIC_STACK(_extra) \ #define POP_BASIC_STACK(_extra) \
ld %r2, STACK_FRAME_TOC_POS(%r1); \
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;