VirtualBox

Changeset 1525 in vbox


Ignore:
Timestamp:
Mar 15, 2007 10:04:36 PM (18 years ago)
Author:
vboxsync
Message:

Make the asm struc testcase work with yasm 0.6.

Location:
trunk/src/VBox/VMM/testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/Makefile

    r1523 r1525  
    5050        $(PATH_TARGET)/tstAsmStructs.h \
    5151        $(PATH_TARGET)/tstAsmStructsAsm.o \
     52        $(PATH_TARGET)/tstAsmStructsAsm.mac \
     53        $(PATH_TARGET)/tstAsmStructsAsm.mac.o \
     54        $(PATH_TARGET)/tstAsmStructsAsm.mac.lst \
    5255        $(PATH_TARGET)/tstAsmStructs.h.dump
    5356
     
    153156#
    154157
    155 # 1. make an aout object containing the offsets.
    156 $(PATH_TARGET)/tstAsmStructsAsm.o: tstAsmStructsAsm.asm \
     158# 1a. make a header file which makes all the structures+members globals.
     159$(PATH_TARGET)/tstAsmStructsAsm.mac: tstAsmStructsAsm.asm tstAsmStructsAsm-lst.sed \
    157160                $(DEPTH)/include/iprt/asmdefs.mac \
    158161                $(DEPTH)/include/VBox/cpum.mac \
     
    174177                        $(DEFS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
    175178                ) \
    176                 -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf -g stabs) \
    177                 $(foreach inc,$(INCS),-I$(inc)/) -o $@ $<
     179                -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf) \
     180                $(foreach inc,$(INCS),-I$(inc)/) -o $@.o -l [email protected] $<
    178181else
    179182        $(QUIET)$(TOOL_NASM_AS) \
     
    187190                ) \
    188191                -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf) \
    189                 $(foreach inc,$(INCS),-I$(inc)/) -o $@ $<
     192                $(foreach inc,$(INCS),-I$(inc)/) -o [email protected] -l [email protected] $<
     193endif
     194        $(SED) -f tstAsmStructsAsm-lst.sed [email protected] > $@
     195
     196
     197
     198# 1b. make an elf/macho object containing the offsets.
     199$(PATH_TARGET)/tstAsmStructsAsm.o: tstAsmStructsAsm.asm $(PATH_TARGET)/tstAsmStructsAsm.mac \
     200                Makefile \
     201                | $(call DIRDEP,$(PATH_TARGET))
     202        $(call MSG_L1,Compiling $<)
     203ifndef DONT_USE_YASM
     204        $(QUIET)$(TOOL_YASM_AS) \
     205                $(addprefix -D, \
     206                        DO_GLOBALS \
     207                        $(DEFS) \
     208                        $(DEFS.$(BUILD_TYPE)) \
     209                        $(DEFS.$(BUILD_TARGET)) \
     210                        IN_RING3 \
     211                        $(DEFS.$(BUILD_TARGET_ARCH)) \
     212                        $(DEFS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     213                ) \
     214                -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf -g stabs) \
     215                $(foreach inc,$(INCS) $(PATH_TARGET),-I$(inc)/) -o $@ $<
     216else
     217        $(QUIET)$(TOOL_NASM_AS) \
     218                $(addprefix -D, \
     219                        DO_GLOBALS \
     220                        $(DEFS) \
     221                        $(DEFS.$(BUILD_TYPE)) \
     222                        $(DEFS.$(BUILD_TARGET)) \
     223                        IN_RING3 \
     224                        $(DEFS.$(BUILD_TARGET_ARCH)) \
     225                        $(DEFS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     226                ) \
     227                -f $(if $(eq $(BUILD_TARGET),darwin),macho,elf) \
     228                $(foreach inc,$(INCS) $(PATH_TARGET),-I$(inc)/) -o $@ $<
    190229endif
    191230
     
    202241        $(VBOX_NM) $< > [email protected]
    203242        $(QUIET)$(SED) -e '/STAMPROFILEADV/d' \
    204                -e '/00[0-9a-fA-F]* a [^_.]*\./!d'     -e 's/\(00[0-9a-fA-F]*\) a \([^.]*\)\.\(.*$$\)/    CHECK_OFF(\2, 0x0\1, \3);/' \
     243               -e '/00[0-9a-fA-F]* [aA] [^_.]*\./!d'     -e 's/\(00[0-9a-fA-F]*\) [aA] \([^.]*\)\.\(.*$$\)/    CHECK_OFF(\2, 0x0\1, \3);/' \
    205244               [email protected][email protected]
    206245        $(QUIET)$(SED) -e '/VM_size$$/d' \
    207                -e '/00[0-9a-fA-F]* a [^_.]*_size$$/!d'  -e 's/\(00[0-9a-fA-F]*\) a \([^_.]*\)_size/    CHECK_SIZE(\2, 0x0\1);/' \
     246               -e '/00[0-9a-fA-F]* [aA] [^_.]*_size$$/!d'  -e 's/\(00[0-9a-fA-F]*\) [aA] \([^_.]*\)_size/    CHECK_SIZE(\2, 0x0\1);/' \
    208247               [email protected] >> [email protected]
    209248        $(QUIET)$(MV) -f [email protected] $@
  • trunk/src/VBox/VMM/testcase/tstAsmStructsAsm.asm

    r19 r1525  
    3333%include "VBox/vm.mac"
    3434%include "../VMMSwitcher/VMMSwitcher.mac"
     35%ifdef DO_GLOBALS
     36 %include "tstAsmStructsAsm.mac"
     37%endif
    3538
    3639.text
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