Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/nolibc: MIPS: drop noreorder option

There are no more statements in the assembly code which would require
the usage of ".set noreorder".

Remove the option.

This also allows removal of the manual "nop" instruction in the
delay slot.

Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.2502172208570.65342@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-3-6ae2d89f4259@weissschuh.net

-4
-4
tools/include/nolibc/arch-mips.h
··· 183 183 void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector __start(void) 184 184 { 185 185 __asm__ volatile ( 186 - ".set push\n" 187 - ".set noreorder\n" 188 186 "move $a0, $sp\n" /* save stack pointer to $a0, as arg1 of _start_c */ 189 187 "addiu $sp, $sp, -16\n" /* the callee expects to save a0..a3 there */ 190 188 "lui $t9, %hi(_start_c)\n" /* ABI requires current function address in $t9 */ 191 189 "ori $t9, %lo(_start_c)\n" 192 190 "jalr $t9\n" /* transfer to c runtime */ 193 - " nop\n" /* delayed slot */ 194 - ".set pop\n" 195 191 ); 196 192 __nolibc_entrypoint_epilogue(); 197 193 }