musl/arch/mips64
Rich Felker 5053fd2644 revert mips64/n32 syscall asm clean-up due to regressions
effectivly revert commit ddc7c4f936
which was wrong; it caused a major regression on Linux versions prior
to 2.6.36. old kernels did not properly preserve r2 across syscall
restart, and instead restarted with the instruction right before
syscall, imposing a contract that the previous instruction must load
r2 from an immediate or a register (or memory) not clobbered by the
syscall.

since other changes were made since, including removal of the struct
stat conversion that was replaced by separate struct kstat, this is
not a direct revert, only a functional one.

the "0"(r2) input constraint added back seems useless/erroneous, but
without it most gcc versions (seems to be all prior to 9.x) fail to
honor the output register binding for r2. this seems to be a variant
of gcc bug #87733. further changes should be made later if a better
workaround is found, but this one has been working since 2012. it
seems this issue was encountered but misidentified then, when it
inspired commit 4221f154ff.
2020-03-14 21:21:45 -04:00
..
bits mips: add clone3 syscall numbers from linux v5.4 2019-12-30 18:14:08 -05:00
atomic_arch.h add support for mips and mips64 r6 isa 2016-04-03 10:42:37 +00:00
crt_arch.h add mips64 port 2016-03-06 17:41:56 +00:00
ksigaction.h apply hidden visibility to sigreturn code fragments 2018-09-12 14:34:34 -04:00
kstat.h remove mips/n32/64 stat struct hacks from syscall machinery 2019-07-18 19:38:37 -04:00
pthread_arch.h make thread-pointer-loading asm non-volatile 2018-10-16 14:11:46 -04:00
reloc.h fix build regression on mips64 due to endian.h removal 2019-11-05 10:15:11 -05:00
syscall_arch.h revert mips64/n32 syscall asm clean-up due to regressions 2020-03-14 21:21:45 -04:00