VirtualBox

Ignore:
Timestamp:
Apr 20, 2016 9:48:09 AM (9 years ago)
Author:
vboxsync
Message:

bs3kit: updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/Config.kmk

    r60578 r60585  
    7575
    7676##
    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.
    7878# @param    1   The target name.
    79 # @param    2   List of functions.
    80 BS3KIT_FN_GEN_CMN_NEARSTUBS = $(foreach fn,$2,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$(fn)_c16,_$(fn)_f16))
     79# @param    2   The common function.
     80BS3KIT_FN_GEN_CMN_NEARSTUB = $(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2_c16,_$2_f16)
    8181
    8282##
    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.
    8484# @param    1   The target name.
    85 # @param    2   List of mode functions.
    86 BS3KIT_FN_GEN_MODE_NEARSTUBS = $(foreach fn,$2,$(foreach suff, \
     85# @param    2   The mode function.
     86BS3KIT_FN_GEN_MODE_NEARSTUB = $(foreach suff, \
    8787        _rm \
    8888        _pe16 \
     
    9999        _paev86 \
    100100        _lm16 \
    101         ,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$(fn)$(suff),_$(fn)$(suff)_far)))
     101        ,$(evalcall2 def_Bs3KitGenNearStubSource,$1,_$2$(suff),_$2$(suff)_far))
    102102
    103103# @param    1   The target name.
     
    124124# Macro for generating far-call aliases for zero or more 16-bit C or assembly functions.
    125125# @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.
     128BS3KIT_FN_GEN_CMN_FARSTUB = $(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,_f16,_c16,$3)
    128129
    129130##
    130131# Macro for generating far-call aliases for zero or more 16-bit C mode functions.
    131132# @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.
     135BS3KIT_FN_GEN_MODE_FARSTUB = $(foreach suff, \
    134136        _rm \
    135137        _pe16 \
     
    146148        _paev86 \
    147149        _lm16 \
    148         ,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$(fn),$(suff)_far,$(suff))
     150        ,$(evalcall2 def_Bs3KitGenFarStubSource,$1,$2,$(suff)_far,$(suff),$3))
    149151
    150152# @param    1   The target name.
    151 # @param    2   The function and amount of parameters.
     153# @param    2   The function name.
    152154# @param    3   The far function suffix.
    153155# @param    4   The near function suffix.
     156# @param    5   The parameter size in bytes.
    154157define 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 $$$$@)
    161161        $(QUIET)$(APPEND) -tn $$@ \
    162162                '%include "bs3kit.mac"' \
    163163        'BS3_BEGIN_TEXT16' \
    164                '      extern  _$(fn2)$4' \
     164               '      extern  _$2$4' \
    165165        'BS3_BEGIN_TEXT16_FARSTUBS' \
    166                 'BS3_PROC_BEGIN _$(fn2)$3' \
     166                'BS3_PROC_BEGIN _$2$3' \
    167167               '      CPU 8086' \
    168168               '      inc     bp' \
    169169               '      push    bp' \
    170170               '      mov     bp, sp' \
    171                '%assign offParam $(cbParam)' \
    172                '%rep $(cbParam) / 2' \
     171               '%assign offParam $5' \
     172               '%rep $5 / 2' \
    173173               '      push    word [bp + 2 + 4 + offParam - 2]' \
    174174               '%assign offParam offParam - 2' \
    175175               '%endrep' \
    176                '      call    _$(fn2)$4' \
    177                '      add     sp, $(cbParam)' \
     176               '      call    _$2$4' \
     177               '      add     sp, $5' \
    178178               '      pop     bp' \
    179179               '      dec     bp' \
    180180               '      retf' \
    181                 'BS3_PROC_END _$(fn2)$3' \
     181                'BS3_PROC_END _$2$3' \
    182182               ''
    183183endef
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette