Commit Graph

4 Commits

Author SHA1 Message Date
Rich Felker 4134c68dd4 unify non-inline version of syscall code across archs
except powerpc, which still lacks inline syscalls simply because
nobody has written the code, these are all fallbacks used to work
around a clang bug that probably does not exist in versions of clang
that can compile musl. however, it's useful to have the generic
non-inline code anyway, as it eases the task of porting to new archs:
writing inline syscall code is now optional. this approach could also
help support compilers which don't understand inline asm or lack
support for the needed register constraints.

mips could not be unified because it has special fixup code for broken
layout of the kernel's struct stat.
2014-11-22 21:50:13 -05:00
Rich Felker de2b9c21d9 fix 64-bit syscall argument passing on or1k
the kernel syscall interface for or1k does not expect 64-bit arguments
to be aligned to "even" register boundaries. this incorrect alignment
broke truncate/ftruncate and as well as a few less-common syscalls.
2014-11-05 00:38:40 -05:00
Rich Felker 4f44937432 fix broken offset argument to the mmap2 syscall on or1k
for or1k, the kernel expects the offset passed to mmap2 in units of
the 8k page size, not the standard unit of 4k used on most other
archs.
2014-07-30 23:25:37 -04:00
Stefan Kristiansson 200d15479c add or1k (OpenRISC 1000) architecture port
With the exception of a fenv implementation, the port is fully featured.
The port has been tested in or1ksim, the golden reference functional
simulator for OpenRISC 1000.
It passes all libc-test tests (except the math tests that
requires a fenv implementation).

The port assumes an or1k implementation that has support for
atomic instructions (l.lwa/l.swa).

Although it passes all the libc-test tests, the port is still
in an experimental state, and has yet experienced very little
'real-world' use.
2014-07-18 14:10:23 -04:00