Skip to content

Commit 36aab16

Browse files
committed
tools/nolibc: MIPS: drop manual stack pointer alignment
The stack pointer is already aligned by the kernel to a multiple of 16. All modifications of the register have been removed from the entrypoint, so the manual realignment is unnecessary. Drop the manual alignment. Suggested-by: Maciej W. Rozycki <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Thomas Weißschuh <[email protected]> Tested-by: Sebastian Andrzej Siewior <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f1e3033 commit 36aab16

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tools/include/nolibc/arch-mips.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector __
186186
".set push\n"
187187
".set noreorder\n"
188188
"move $a0, $sp\n" /* save stack pointer to $a0, as arg1 of _start_c */
189-
"li $t0, -8\n"
190-
"and $sp, $sp, $t0\n" /* $sp must be 8-byte aligned */
191189
"addiu $sp, $sp, -16\n" /* the callee expects to save a0..a3 there */
192190
"lui $t9, %hi(_start_c)\n" /* ABI requires current function address in $t9 */
193191
"ori $t9, %lo(_start_c)\n"

0 commit comments

Comments
 (0)