mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-28 17:29:41 +03:00
50b2538b02
git-svn-id: svn://kolibrios.org@5195 a494cfbc-eb01-0410-851d-a64ba20cac60
25 lines
602 B
PHP
25 lines
602 B
PHP
; Magic for proc32.inc: prologue/epilogue for esp-based addressing
|
|
; fpo stands from Frame Pointer Omission
|
|
macro fpo_prologue procname,flag,parmbytes,localbytes,reglist
|
|
{
|
|
local loc,regcount
|
|
loc = (localbytes+3) and (not 3)
|
|
regcount = 0
|
|
irps reg, reglist
|
|
\{
|
|
regcount = regcount+1
|
|
push reg
|
|
\}
|
|
parmbase@proc equ esp+4+regcount*4
|
|
localbase@proc equ esp-localbytes
|
|
}
|
|
macro fpo_epilogue procname,flag,parmbytes,localbytes,reglist
|
|
{
|
|
irps reg, reglist \{ reverse pop reg \}
|
|
if flag and 10000b
|
|
retn
|
|
else
|
|
retn parmbytes
|
|
end if
|
|
}
|