Commit Graph

4 Commits

Author SHA1 Message Date
Rich Felker 35a6801c6c fix arm atomic store and generate simpler/less-bloated/faster code
atomic store was lacking a barrier, which was fine for legacy arm with
no real smp and kernel-emulated cas, but unsuitable for more modern
systems. the kernel provides another "kuser" function, at 0xffff0fa0,
which could be used for the barrier, but using that would drop support
for kernels 2.6.12 through 2.6.14 unless an extra conditional were
added to check for barrier availability. just using the barrier in the
kernel cas is easier, and, based on my reading of the assembly code in
the kernel, does not appear to be significantly slower.

at the same time, other atomic operations are adapted to call the
kernel cas function directly rather than using a_cas; due to small
differences in their interface contracts, this makes the generated
code much simpler.
2013-09-22 03:06:17 -04:00
Rich Felker 7568ee4cbf add missing a_or_l to atomic.h for non-x86 archs
this is needed for recently committed sigaction code
2013-08-11 03:43:25 -04:00
Rich Felker a3bdcd9376 remove little-endian assumption from arm atomic.h
this hidden endian dependency had left big endian arm badly broken.
2012-07-08 00:05:08 -04:00
Rich Felker d960d4f2cb initial commit of the arm port
this port assumes eabi calling conventions, eabi linux syscall
convention, and presence of the kernel helpers at 0xffff0f?0 needed
for threads support. otherwise it makes very few assumptions, and the
code should work even on armv4 without thumb support, as well as on
systems with thumb interworking. the bits headers declare this a
little endian system, but as far as i can tell the code should work
equally well on big endian.

some small details are probably broken; so far, testing has been
limited to qemu/aboriginal linux.
2011-09-18 16:44:54 -04:00