plan9fox/sys/src/ape/lib/ap/alpha
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 Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
cycles.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
divl.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
divq.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
getfcr.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
lock.c reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29) 2013-09-26 22:24:31 +02:00
main9.s ape: threadsafe errno 2013-03-11 18:57:22 +01:00
main9p.s prof: properly save and restore RARG for amd64 2014-02-17 13:25:24 +01:00
memcpy.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
memmove.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
memset.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mkfile Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
notetramp.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
setjmp.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
tas.s Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00