VirtualBox

Changeset 96377 in vbox


Ignore:
Timestamp:
Aug 20, 2022 4:05:24 PM (2 years ago)
Author:
vboxsync
Message:

VMM/testcase/tstIEMAImpl: Seems complicated C preprocessor stuff doesn't work for clang, so use an assembler macro instead. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstIEMAImplDataSseBinary.S

    r96352 r96377  
    3434    .globl NAME(g_aTests_ ## a_Instr) \
    3535    NAME(g_aTests_ ## a_Instr): \
    36         .incbin # a_DataFile \
     36        .incbin a_DataFile \
    3737    end_g_aTests_ ## a_Instr: \
    3838    .p2align 2 \
     
    4343    .type g_aTests_ ## a_Instr, object \
    4444    .size g_cbTests_ ## a_Instr, 4 \
    45     .type g_cbTests_ ## a_Instr, object \
     45    .type g_cbTests_ ## a_Instr, object
    4646#else
    47 # define IEM_TEST_DATA(a_Instr, a_DataFile) \
    48     .p2align 6 \
    49     .globl NAME(g_aTests_ ## a_Instr) \
    50     NAME(g_aTests_ ## a_Instr): \
    51         .incbin # a_DataFile \
    52     end_g_aTests_ ## a_Instr: \
    53     .p2align 2 \
    54     .globl NAME(g_cbTests_ ## a_Instr) \
    55     NAME(g_cbTests_ ## a_Instr): \
    56             .long end_g_aTests_ ## a_Instr - NAME(g_aTests_ ## a_Instr)
     47/* A macro in the style of the ELF one above does not work for clang/cc1as due
     48   to lack of proper newlines.  So, use an assembler macro instead.  */
     49.macro IEM_TEST_DATA_MACRO a_Instr, a_szDataFile
     50    .p2align 6
     51    .globl NAME(g_aTests_\a_Instr)
     52NAME(g_aTests_\a_Instr):
     53    .incbin "\a_szDataFile"
     54NAME(g_aTests_end_\a_Instr):
     55   
     56    .p2align 2
     57    .globl NAME(g_cbTest_\a_Instr)
     58NAME(g_cbTest_\a_Instr):
     59    .int   NAME(g_aTests_end_\a_Instr) - NAME(g_aTests_\a_Instr)
     60.endm
     61# define IEM_TEST_DATA(a,b) IEM_TEST_DATA_MACRO a, b
    5762#endif
    5863
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