History log of /src/tests/kernel/arch/mips |
Revision | Date | Author | Comments |
1.2 | 27-Apr-2025 |
riastradh | t_signal_and_sp: Try to fix mips o32 tests.
Evidently, for o32, PIC_PROLOGUE (which expands to .cpload) must be the very first instruction of the function, or else it will get the $gp calculation wrong.
Since it seems that the mips PIC_PROLOGUE does not, after all, mess with the stack, let's just dispense with the temporary copy of sp in t0 which I had added in paranoia over what magic might happen inside PIC_PROLOGUE. (Such paranoia is not entirely unjustified -- for example, the sh3 PIC_PROLOGUE _does_ push data on the stack, though this can be bypassed with PIC_PROLOGUE_NOSAVE.)
PR kern/59327: user stack pointer is not aligned properly
|
1.1 | 21-Apr-2025 |
riastradh | t_signal_and_sp: Test makecontext and pthread_create stack alignment.
PR kern/59327: user stack pointer is not aligned properly
|
1.2 | 27-Apr-2025 |
riastradh | t_signal_and_sp: Try to fix mips o32 tests.
Evidently, for o32, PIC_PROLOGUE (which expands to .cpload) must be the very first instruction of the function, or else it will get the $gp calculation wrong.
Since it seems that the mips PIC_PROLOGUE does not, after all, mess with the stack, let's just dispense with the temporary copy of sp in t0 which I had added in paranoia over what magic might happen inside PIC_PROLOGUE. (Such paranoia is not entirely unjustified -- for example, the sh3 PIC_PROLOGUE _does_ push data on the stack, though this can be bypassed with PIC_PROLOGUE_NOSAVE.)
PR kern/59327: user stack pointer is not aligned properly
|
1.1 | 20-Apr-2025 |
riastradh | t_signal_and_sp: Add mips support.
PR kern/59327: user stack pointer is not aligned properly
PR kern/58149: Cannot return from a signal handler if SP was misaligned when the signal arrived
Stack pointer misaligment in some cases hypothesized to be a possible cause of:
PR port-evbmips/59236: Multiple segfaults in erlite3 boot
|
1.2 | 27-Apr-2025 |
riastradh | t_signal_and_sp: Try to fix mips o32 tests.
Evidently, for o32, PIC_PROLOGUE (which expands to .cpload) must be the very first instruction of the function, or else it will get the $gp calculation wrong.
Since it seems that the mips PIC_PROLOGUE does not, after all, mess with the stack, let's just dispense with the temporary copy of sp in t0 which I had added in paranoia over what magic might happen inside PIC_PROLOGUE. (Such paranoia is not entirely unjustified -- for example, the sh3 PIC_PROLOGUE _does_ push data on the stack, though this can be bypassed with PIC_PROLOGUE_NOSAVE.)
PR kern/59327: user stack pointer is not aligned properly
|
1.1 | 20-Apr-2025 |
riastradh | t_signal_and_sp: Add mips support.
PR kern/59327: user stack pointer is not aligned properly
PR kern/58149: Cannot return from a signal handler if SP was misaligned when the signal arrived
Stack pointer misaligment in some cases hypothesized to be a possible cause of:
PR port-evbmips/59236: Multiple segfaults in erlite3 boot
|
1.2 | 21-Apr-2025 |
rin | t_signal_and_sp: mips: Fix {MISALIGN,FIX}_SP() for !o32
Use `daddiu` instead of `addiu` as done in <mips/asm.h>.
Otherwise, +/-1 is added to lower-32-bits of sp, and then results are sign-extended to whole-64-bits register (oops!!).
|
1.1 | 20-Apr-2025 |
riastradh | t_signal_and_sp: Add mips support.
PR kern/59327: user stack pointer is not aligned properly
PR kern/58149: Cannot return from a signal handler if SP was misaligned when the signal arrived
Stack pointer misaligment in some cases hypothesized to be a possible cause of:
PR port-evbmips/59236: Multiple segfaults in erlite3 boot
|
1.2 | 21-Apr-2025 |
riastradh | t_signal_and_sp: Fix threadspfunc on mips.
1. Writing branch delay slots requires `.set noreorder'. Got used to reading and writing RISCy code with branch delay slots ages ago, still haven't gotten used to having to tell the assembler `no, I really want you to assemble the instructions I wrote, as I wrote them, and not some other instructions in some other order'.
2. Return value is v0 on mips, not a0 like modern mips^W^Wriscv.
With this, the threadsp test passes on mips.
PR kern/59327: user stack pointer is not aligned properly
|
1.1 | 21-Apr-2025 |
riastradh | t_signal_and_sp: Test makecontext and pthread_create stack alignment.
PR kern/59327: user stack pointer is not aligned properly
|