plan9fox/sys/src/ape/lib/ap/amd64
cinap_lenrek 2c5c784255 prof: properly save and restore RARG for amd64
amd64 passes first argument in RARG (BP) register
which has the be preserved duing _profin() and
_profout() calls. to handle this we introduce
_saveret() and _savearg(). _saveret() returns
AX, _savearg() returns RARG (BP). for archs other
and amd64, _saveret() and _savearg() are the
same function, doing nothing.

restoing works with dummy function:

uintptr
_restore(uintptr, uintptr ret)
{
	return ret;
}

...

ret = _saveret();
arg = _savearg();
...
return _restore(arg, ret);

as we pass arg as the first argument, RARG (BP) is
restored.
2014-02-17 13:25:24 +01:00
..
_seek.c libc and ape support for amd64 2014-02-01 10:31:41 +01:00
cycles.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00
lock.c libc and ape support for amd64 2014-02-01 10:31:41 +01:00
main9.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00
main9p.s prof: properly save and restore RARG for amd64 2014-02-17 13:25:24 +01:00
mkfile libc and ape support for amd64 2014-02-01 10:31:41 +01:00
notetramp.c libc and ape support for amd64 2014-02-01 10:31:41 +01:00
setjmp.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00
strchr.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00
strlen.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00
tas.s libc and ape support for amd64 2014-02-01 10:31:41 +01:00