Changeset 60585 in vbox for trunk/src/VBox/ValidationKit/bootsectors/Config.kmk
- Timestamp:
- Apr 20, 2016 9:48:09 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/Config.kmk
r60578 r60585 75 75 76 76 ## 77 # Macro for generating near-call aliases for zero or more 16-bit C functions.77 # Macro for generating near-call aliases for one 16-bit C function. 78 78 # @param 1 The target name. 79 # @param 2 List of functions.80 BS3KIT_FN_GEN_CMN_NEARSTUB S = $(foreach fn,$2,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$(fn)_c16,_$(fn)_f16))79 # @param 2 The common function. 80 BS3KIT_FN_GEN_CMN_NEARSTUB = $(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2_c16,_$2_f16) 81 81 82 82 ## 83 # Macro for generating near-call aliases for zero or more 16-bit C mode functions.83 # Macro for generating near-call aliases for one 16-bit C mode function. 84 84 # @param 1 The target name. 85 # @param 2 List of mode functions.86 BS3KIT_FN_GEN_MODE_NEARSTUB S = $(foreach fn,$2,$(foreach suff, \85 # @param 2 The mode function. 86 BS3KIT_FN_GEN_MODE_NEARSTUB = $(foreach suff, \ 87 87 _rm \ 88 88 _pe16 \ … … 99 99 _paev86 \ 100 100 _lm16 \ 101 ,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$ (fn)$(suff),_$(fn)$(suff)_far)))101 ,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2$(suff),_$2$(suff)_far)) 102 102 103 103 # @param 1 The target name. … … 124 124 # Macro for generating far-call aliases for zero or more 16-bit C or assembly functions. 125 125 # @param 1 The target name. 126 # @param 2 List of functions. 127 BS3KIT_FN_GEN_CMN_FARSTUBS = $(foreach fn,$2,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$(fn),_f16,_c16)) 126 # @param 2 The common function. 127 # @param 3 The parameter size in bytes. 128 BS3KIT_FN_GEN_CMN_FARSTUB = $(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,_f16,_c16,$3) 128 129 129 130 ## 130 131 # Macro for generating far-call aliases for zero or more 16-bit C mode functions. 131 132 # @param 1 The target name. 132 # @param 2 List of mode functions. 133 BS3KIT_FN_GEN_MODE_FARSTUBS = $(foreach fn,$2,$(foreach suff, \ 133 # @param 2 The mode function. 134 # @param 3 The parameter size in bytes. 135 BS3KIT_FN_GEN_MODE_FARSTUB = $(foreach suff, \ 134 136 _rm \ 135 137 _pe16 \ … … 146 148 _paev86 \ 147 149 _lm16 \ 148 ,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$ (fn),$(suff)_far,$(suff))150 ,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,$(suff)_far,$(suff),$3)) 149 151 150 152 # @param 1 The target name. 151 # @param 2 The function and amount of parameters.153 # @param 2 The function name. 152 154 # @param 3 The far function suffix. 153 155 # @param 4 The near function suffix. 156 # @param 5 The parameter size in bytes. 154 157 define def_Bs3KitGenFarStubSource 155 $(eval local fn2 = $(firstword $(subst :, $(SP), $2))) 156 $(eval local cbParam = $(lastword $(subst :, $(SP), $2))) 157 158 $1_SOURCES += $$($1_0_OUTDIR)/stub_$(fn2)$3.asm 159 $1_CLEAN += $$($1_0_OUTDIR)/stub_$(fn2)$3.asm 160 $$$$($1_0_OUTDIR)/stub_$(fn2)$3.asm: $$(VBOX_PATH_BOOTSECTORS_SRC)/Config.kmk | $$$$(dir $$$$@) 158 $1_SOURCES += $$($1_0_OUTDIR)/stub_$2$3.asm 159 $1_CLEAN += $$($1_0_OUTDIR)/stub_$2$3.asm 160 $$$$($1_0_OUTDIR)/stub_$2$3.asm: $$(VBOX_PATH_BOOTSECTORS_SRC)/Config.kmk | $$$$(dir $$$$@) 161 161 $(QUIET)$(APPEND) -tn $$@ \ 162 162 '%include "bs3kit.mac"' \ 163 163 'BS3_BEGIN_TEXT16' \ 164 ' extern _$ (fn2)$4' \164 ' extern _$2$4' \ 165 165 'BS3_BEGIN_TEXT16_FARSTUBS' \ 166 'BS3_PROC_BEGIN _$ (fn2)$3' \166 'BS3_PROC_BEGIN _$2$3' \ 167 167 ' CPU 8086' \ 168 168 ' inc bp' \ 169 169 ' push bp' \ 170 170 ' mov bp, sp' \ 171 '%assign offParam $ (cbParam)' \172 '%rep $ (cbParam)/ 2' \171 '%assign offParam $5' \ 172 '%rep $5 / 2' \ 173 173 ' push word [bp + 2 + 4 + offParam - 2]' \ 174 174 '%assign offParam offParam - 2' \ 175 175 '%endrep' \ 176 ' call _$ (fn2)$4' \177 ' add sp, $ (cbParam)' \176 ' call _$2$4' \ 177 ' add sp, $5' \ 178 178 ' pop bp' \ 179 179 ' dec bp' \ 180 180 ' retf' \ 181 'BS3_PROC_END _$ (fn2)$3' \181 'BS3_PROC_END _$2$3' \ 182 182 '' 183 183 endef
Note:
See TracChangeset
for help on using the changeset viewer.