plan9fox/sys
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
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: undelete 2014-01-22 01:19:50 -05:00
include factotum/authsrv: fix padding for mschap on amd64, use constants for structure sizes 2014-02-15 19:57:13 +01:00
lib truss: use A instead of X as address format for data dump 2014-02-16 19:20:57 +01:00
man xd: changed -s option to switch to little-endian units 2014-02-16 21:32:14 +01:00
src prof: properly save and restore RARG for amd64 2014-02-17 13:25:24 +01:00