VirtualBox

Changeset 67161 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
May 31, 2017 9:57:31 AM (8 years ago)
Author:
vboxsync
Message:

bs3-cpu-generated-1-template.c: Redid r115830 by not using BS3_DECL_NEAR for FNBS3CG1ENCODER and by moving the PBS3CG1STATE typedef up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r67154 r67161  
    113113
    114114
     115/** Pointer to the generated test state. */
     116typedef struct BS3CG1STATE *PBS3CG1STATE;
     117
    115118/**
    116119 * Encoder callback.
     
    120123 * @param   iEncoding   The encoding.
    121124 */
    122 struct BS3CG1STATE;
    123 typedef BS3_DECL_NEAR(unsigned) FNBS3CG1ENCODER(struct BS3CG1STATE *pThis, unsigned iEncoding);
     125typedef unsigned BS3_NEAR_CODE FNBS3CG1ENCODER(PBS3CG1STATE pThis, unsigned iEncoding);
    124126/** Pointer to a encoder callback. */
    125127typedef FNBS3CG1ENCODER *PFNBS3CG1ENCODER;
     
    317319
    318320} BS3CG1STATE;
    319 /** Pointer to the generated test state. */
    320 typedef BS3CG1STATE *PBS3CG1STATE;
    321321
    322322
     
    15021502
    15031503
    1504 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Eb_Gb_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
     1504static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Eb_Gb_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    15051505{
    15061506    unsigned off;
     
    15411541
    15421542
    1543 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Gv_Ev__OR__MODRM_Ev_Gv(PBS3CG1STATE pThis, unsigned iEncoding)
     1543static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Gv_Ev__OR__MODRM_Ev_Gv(PBS3CG1STATE pThis, unsigned iEncoding)
    15441544{
    15451545    unsigned off;
     
    16171617
    16181618
    1619 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Pq_WO_Qq(PBS3CG1STATE pThis, unsigned iEncoding)
     1619static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Pq_WO_Qq(PBS3CG1STATE pThis, unsigned iEncoding)
    16201620{
    16211621    unsigned off;
     
    16691669
    16701670
    1671 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Pq_WO_Uq(PBS3CG1STATE pThis, unsigned iEncoding)
     1671static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Pq_WO_Uq(PBS3CG1STATE pThis, unsigned iEncoding)
    16721672{
    16731673    unsigned off;
     
    16971697
    16981698
    1699 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_PdZx_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
     1699static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_PdZx_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
    17001700{
    17011701    unsigned off;
     
    17471747
    17481748
    1749 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Pq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
     1749static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Pq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
    17501750{
    17511751#if ARCH_BITS == 64
     
    18061806
    18071807/* Differs from Bs3Cg1EncodeNext_MODRM_PdZx_WO_Ed_WZ in that REX.R isn't ignored. */
    1808 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Vd_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
     1808static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vd_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
    18091809{
    18101810    unsigned off;
     
    18571857
    18581858/* Differs from Bs3Cg1EncodeNext_MODRM_Pq_WO_Eq_WNZ in that REX.R isn't ignored. */
    1859 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Vq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
     1859static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
    18601860{
    18611861#if ARCH_BITS == 64
     
    19151915
    19161916
    1917 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Vsomething_Usomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
     1917static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Usomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    19181918{
    19191919    unsigned off;
     
    19431943
    19441944
    1945 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Vsomething_Wsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
     1945static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Wsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    19461946{
    19471947    unsigned off;
     
    19711971
    19721972
    1973 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Vsomething_Nsomething(PBS3CG1STATE pThis, unsigned iEncoding)
     1973static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Vsomething_Nsomething(PBS3CG1STATE pThis, unsigned iEncoding)
    19741974{
    19751975    unsigned off;
     
    20002000
    20012001
    2002 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma(PBS3CG1STATE pThis, unsigned iEncoding) /* bound instr */
     2002static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Gv_RO_Ma(PBS3CG1STATE pThis, unsigned iEncoding) /* bound instr */
    20032003{
    20042004    unsigned off;
     
    20402040
    20412041
    2042 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Msomething(PBS3CG1STATE pThis, unsigned iEncoding)
     2042static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Msomething(PBS3CG1STATE pThis, unsigned iEncoding)
    20432043{
    20442044    unsigned off;
     
    20572057
    20582058
    2059 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Msomething_Psomething(PBS3CG1STATE pThis, unsigned iEncoding)
     2059static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Msomething_Psomething(PBS3CG1STATE pThis, unsigned iEncoding)
    20602060{
    20612061    unsigned off;
     
    20892089
    20902090
    2091 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_Msomething_Vsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
     2091static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_Msomething_Vsomething_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    20922092{
    20932093    unsigned off;
     
    21192119
    21202120
    2121 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_FIXED(PBS3CG1STATE pThis, unsigned iEncoding)
     2121static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_FIXED(PBS3CG1STATE pThis, unsigned iEncoding)
    21222122{
    21232123    unsigned off;
     
    21352135
    21362136
    2137 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_FIXED_AL_Ib(PBS3CG1STATE pThis, unsigned iEncoding)
     2137static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_FIXED_AL_Ib(PBS3CG1STATE pThis, unsigned iEncoding)
    21382138{
    21392139    unsigned off;
     
    21532153
    21542154
    2155 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_FIXED_rAX_Iz(PBS3CG1STATE pThis, unsigned iEncoding)
     2155static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_FIXED_rAX_Iz(PBS3CG1STATE pThis, unsigned iEncoding)
    21562156{
    21572157    unsigned off;
     
    22162216
    22172217
    2218 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_MOD_EQ_3(PBS3CG1STATE pThis, unsigned iEncoding)
     2218static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_MOD_EQ_3(PBS3CG1STATE pThis, unsigned iEncoding)
    22192219{
    22202220    unsigned off;
     
    22392239
    22402240
    2241 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_MODRM_MOD_NE_3(PBS3CG1STATE pThis, unsigned iEncoding)
     2241static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_MODRM_MOD_NE_3(PBS3CG1STATE pThis, unsigned iEncoding)
    22422242{
    22432243    unsigned off;
     
    23802380
    23812381
    2382 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM_Vd_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
     2382static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Vd_WO_Ed_WZ(PBS3CG1STATE pThis, unsigned iEncoding)
    23832383{
    23842384    unsigned off;
     
    24622462
    24632463/* Differs from Bs3Cg1EncodeNext_MODRM_Pq_WO_Eq_WNZ in that REX.R isn't ignored. */
    2464 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM_Vq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
     2464static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Vq_WO_Eq_WNZ(PBS3CG1STATE pThis, unsigned iEncoding)
    24652465{
    24662466#if ARCH_BITS == 64
     
    25262526 * Lig - VEX.L ignored.
    25272527 */
    2528 static BS3_DECL_NEAR_CALLBACK(unsigned)
     2528static unsigned BS3_NEAR_CODE
    25292529Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Hsomething_Usomething_Lip_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    25302530{
     
    25862586 * Wip - VEX.W ignored.
    25872587 */
    2588 static BS3_DECL_NEAR_CALLBACK(unsigned)
     2588static unsigned BS3_NEAR_CODE
    25892589Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_HdqCsomething_Usomething_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    25902590{
     
    26482648 * Wip - VEX.W ignored.
    26492649 */
    2650 static BS3_DECL_NEAR_CALLBACK(unsigned)
     2650static unsigned BS3_NEAR_CODE
    26512651Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    26522652{
     
    27422742 * Lig - VEX.L ignored.
    27432743 */
    2744 static BS3_DECL_NEAR_CALLBACK(unsigned)
     2744static unsigned BS3_NEAR_CODE
    27452745Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_Lig_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    27462746{
     
    28302830 * L0 - VEX.L must be zero.
    28312831 */
    2832 static BS3_DECL_NEAR_CALLBACK(unsigned)
     2832static unsigned BS3_NEAR_CODE
    28332833Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_Lmbz_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    28342834{
     
    30013001 * L0 - VEX.L is zero (encoding may exist where it isn't).
    30023002 */
    3003 static BS3_DECL_NEAR_CALLBACK(unsigned)
     3003static unsigned BS3_NEAR_CODE
    30043004Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_L0_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    30053005{
     
    30123012 * L1 - VEX.L is one (encoding may exist where it isn't).
    30133013 */
    3014 static BS3_DECL_NEAR_CALLBACK(unsigned)
     3014static unsigned BS3_NEAR_CODE
    30153015Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Msomething_Wip_L1_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    30163016{
     
    30233023 * Wip - VEX.W ignored.
    30243024 */
    3025 static BS3_DECL_NEAR_CALLBACK(unsigned)
     3025static unsigned BS3_NEAR_CODE
    30263026Bs3Cg1EncodeNext_VEX_MODRM_VsomethingWO_Hsomething_Msomething_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    30273027{
     
    31123112
    31133113
    3114 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM_Md_WO(PBS3CG1STATE pThis, unsigned iEncoding)
     3114static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_Md_WO(PBS3CG1STATE pThis, unsigned iEncoding)
    31153115{
    31163116    unsigned off;
     
    31883188 * Lmbz = VEX.L must be zero.
    31893189 */
    3190 static BS3_DECL_NEAR_CALLBACK(unsigned)
     3190static unsigned BS3_NEAR_CODE
    31913191Bs3Cg1EncodeNext_VEX_MODRM_WsomethingWO_Vsomething_Wip_Lmbz_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    31923192{
     
    32703270 * Wip = VEX.W ignored.
    32713271 */
    3272 static BS3_DECL_NEAR_CALLBACK(unsigned)
     3272static unsigned BS3_NEAR_CODE
    32733273Bs3Cg1EncodeNext_VEX_MODRM_WsomethingWO_Vsomething_Wip_OR_ViceVersa(PBS3CG1STATE pThis, unsigned iEncoding)
    32743274{
     
    34273427
    34283428
    3429 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM_MOD_EQ_3(PBS3CG1STATE pThis, unsigned iEncoding)
     3429static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_MOD_EQ_3(PBS3CG1STATE pThis, unsigned iEncoding)
    34303430{
    34313431    unsigned off;
     
    34753475
    34763476
    3477 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM_MOD_NE_3(PBS3CG1STATE pThis, unsigned iEncoding)
     3477static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM_MOD_NE_3(PBS3CG1STATE pThis, unsigned iEncoding)
    34783478{
    34793479    unsigned off;
     
    35073507
    35083508
    3509 static BS3_DECL_NEAR_CALLBACK(unsigned) Bs3Cg1EncodeNext_VEX_MODRM(PBS3CG1STATE pThis, unsigned iEncoding)
     3509static unsigned BS3_NEAR_CODE Bs3Cg1EncodeNext_VEX_MODRM(PBS3CG1STATE pThis, unsigned iEncoding)
    35103510{
    35113511    const unsigned cFirstEncodings = 32;
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