Rev 6614 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6614 | Rev 6767 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | sub esp, loc |
14 | sub esp, loc |
15 | end if |
15 | end if |
16 | parmbase@proc equ esp+4+loc+regcount*4 |
16 | parmbase@proc equ esp+4+loc+regcount*4 |
17 | localbase@proc equ esp |
17 | localbase@proc equ esp |
18 | fpo_localsize = loc |
18 | fpo_localsize = loc |
- | 19 | fpo_delta = 0 |
|
19 | } |
20 | } |
20 | macro fpo_epilogue procname,flag,parmbytes,localbytes,reglist |
21 | macro fpo_epilogue procname,flag,parmbytes,localbytes,reglist |
21 | { |
22 | { |
- | 23 | if fpo_localsize |
|
- | 24 | add esp, fpo_localsize |
|
- | 25 | end if |
|
22 | irps reg, reglist \{ reverse pop reg \} |
26 | irps reg, reglist \{ reverse pop reg \} |
23 | if flag and 10000b |
27 | if flag and 10000b |
24 | retn |
28 | retn |
25 | else |
29 | else |
26 | retn parmbytes |
30 | retn parmbytes |
27 | end if |
31 | end if |
28 | } |
32 | } |
- | 33 | macro deflocal@proc name,def,[val] |
|
- | 34 | { |
|
- | 35 | common |
|
- | 36 | deflocal@proc name#_unique_suffix,def,val |
|
- | 37 | all@vars equ all@vars,name |
|
- | 38 | name equ name#_unique_suffix+fpo_delta |
|
- | 39 | } |
|
- | 40 | macro defargs@proc [arg] |
|
- | 41 | { |
|
- | 42 | common |
|
- | 43 | rawargs equ |
|
- | 44 | srcargs equ arg |
|
- | 45 | forward |
|
- | 46 | rawargs equ rawargs,arg#_unique_suffix |
|
- | 47 | common |
|
- | 48 | match =,tmp,rawargs \{ |
|
- | 49 | defargs@proc tmp |
|
- | 50 | uniqargs equ args@proc |
|
- | 51 | restore args@proc |
|
- | 52 | args@proc equ uniqargs,srcargs |
|
- | 53 | \} |
|
- | 54 | forward |
|
- | 55 | arg equ arg#_unique_suffix+fpo_delta |
|
- | 56 | } |
|
- | 57 | macro stdcall proc,[arg] ; directly call STDCALL procedure |
|
- | 58 | { common |
|
- | 59 | fpo_delta_base = fpo_delta |
|
- | 60 | if ~ arg eq |
|
- | 61 | reverse |
|
- | 62 | pushd arg |
|
- | 63 | fpo_delta = fpo_delta + 4 |
|
- | 64 | common |
|
- | 65 | end if |
|
- | 66 | call proc |
|
- | 67 | fpo_delta = fpo_delta_base |
|
- | 68 | } |
|
- | 69 | macro ccall proc,[arg] ; directly call CDECL procedure |
|
- | 70 | { common |
|
- | 71 | fpo_delta_base = fpo_delta |
|
- | 72 | size@ccall = 0 |
|
- | 73 | if ~ arg eq |
|
- | 74 | reverse |
|
- | 75 | pushd arg |
|
- | 76 | fpo_delta = fpo_delta + 4 |
|
- | 77 | size@ccall = size@ccall+4 |
|
- | 78 | common |
|
- | 79 | end if |
|
- | 80 | call proc |
|
- | 81 | if size@ccall |
|
- | 82 | add esp, size@ccall |
|
- | 83 | end if |
|
- | 84 | fpo_delta = fpo_delta_base |
|
- | 85 | } |
|
- | 86 | fpo_delta = 0 |