mailing list of musl libc
 help / color / mirror / code / Atom feed
* x32 port info, issues?
@ 2013-04-20 18:19 Rich Felker
  0 siblings, 0 replies; only message in thread
From: Rich Felker @ 2013-04-20 18:19 UTC (permalink / raw)
  To: musl

Hi,
I'm potentially interested in doing the x32 (ILP32 model on x86_64
hardware) port of musl sometime soon, now that I have access to
high-end machines for testing, but I'm not finding much information on
the contents the headers should have. Anyone more familiar with x32
able to fill this in for me?

My understanding is that the struct layouts mostly/all match x86_64.
Is this correct?

How are 64-bit values passed to syscalls? In a single register, or in
pairs like 32-bit archs? If it's a single register, this would require
a lot of ugliness to support...

One other issue I found in this mail:
http://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00105.html

It looks like x32 does not have syscalls that treat timespec as having
a 32-bit tv_nsec member. This may mean all syscalls passing timespecs
to the kernel need to go through a temp on the stack with the padding
bits filled with zeros. At least the test for whether this is needed
should be easy:

	if (sizeof(struct timespec) > sizeof(time_t) + sizeof(long))

so we can avoid the overhead/bloat on archs that don't need it.

Hopefully this port will be quick and easy once I have my gaps in
knowledge on the above issues filled in.

Rich


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-20 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-20 18:19 x32 port info, issues? Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).