History log of /seL4-camkes-master/projects/musllibc/src/thread/sh/syscall_cp.s
Revision Date Author Comments
# 36e8b6a2 02-Nov-2015 Rich Felker <dalias@aerifal.cx>

use explicit __cp_cancel label in cancellable syscall asm for all archs

previously, only archs that needed to do stack cleanup defined a
__cp_cancel label for acting on cancellation in their syscall asm, and
a default definition was provided by a weak alias to __cancel, the C
function. this resulted in wrong codegen for arm on gcc versions
affected by pr 68178 and possibly similar issues (like pr 66609) on
other archs, and also created an inconsistency where the __cp_begin
and __cp_end labels were treated as const data but __cp_cancel was
treated as a function. this in turn caused incorrect code generation
on archs where function pointers point to function descriptors rather
than code (for now, only sh/fdpic).


# 10d0268c 16-Jun-2015 Rich Felker <dalias@aerifal.cx>

switch to using trap number 31 for syscalls on sh

nominally the low bits of the trap number on sh are the number of
syscall arguments, but they have never been used by the kernel, and
some code making syscalls does not even know the number of arguments
and needs to pass an arbitrary high number anyway.

sh3/sh4 traditionally used the trap range 16-31 for syscalls, but part
of this range overlapped with hardware exceptions/interrupts on sh2
hardware, so an incompatible range 32-47 was chosen for sh2.

using trap number 31 everywhere, since it's in the existing sh3/sh4
range and does not conflict with sh2 hardware, is a proposed
unification of the kernel syscall convention that will allow binaries
to be shared between sh2 and sh3/sh4. if this is not accepted into the
kernel, we can refit the sh2 target with runtime selection mechanisms
for the trap number, but doing so would be invasive and would entail
non-trivial overhead.


# 33615cd5 17-Apr-2015 Rich Felker <dalias@aerifal.cx>

fix sh build regressions in asm

even hidden functions need @PLT symbol references; otherwise an
absolute address is produced instead of a PC-relative one.


# cbc02ba2 14-Apr-2015 Rich Felker <dalias@aerifal.cx>

consistently use hidden visibility for cancellable syscall internals

in a few places, non-hidden symbols were referenced from asm in ways
that assumed ld-time binding. while these is no semantic reason these
symbols need to be hidden, fixing the references without making them
hidden was going to be ugly, and hidden reduces some bloat anyway.

in the asm files, .global/.hidden directives have been moved to the
top to unclutter the actual code.


# aacd3486 27-Feb-2014 Rich Felker <dalias@aerifal.cx>

rename superh port to "sh" for consistency

linux, gcc, etc. all use "sh" as the name for the superh arch. there
was already some inconsistency internally in musl: the dynamic linker
was searching for "ld-musl-sh.path" as its path file despite its own
name being "ld-musl-superh.so.1". there was some sentiment in both
directions as to how to resolve the inconsistency, but overall "sh"
was favored.