VirtualBox

Changeset 65871 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Feb 23, 2017 10:23:29 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113646
Message:

IEM: Addding disassembler info to new IEMOP_MNEMONIC macros.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r65793 r65871  
    1146411464              pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK ? "lock " : "", a_szMnemonic, pVCpu->iem.s.cInstructions)); \
    1146511465    } while (0)
     11466
     11467# define IEMOP_MNEMONIC0EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints) \
     11468    do { \
     11469        IEMOP_MNEMONIC(a_Stats, a_szMnemonic); \
     11470        (void)RT_CONCAT(IEMOPFORM_, a_Form); \
     11471        (void)RT_CONCAT(OP_,a_Upper); \
     11472        (void)(a_fDisHints); \
     11473        (void)(a_fIemHints); \
     11474    } while (0)
     11475
     11476# define IEMOP_MNEMONIC1EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints) \
     11477    do { \
     11478        IEMOP_MNEMONIC(a_Stats, a_szMnemonic); \
     11479        (void)RT_CONCAT(IEMOPFORM_, a_Form); \
     11480        (void)RT_CONCAT(OP_,a_Upper); \
     11481        (void)RT_CONCAT(OP_PARM_,a_Op1); \
     11482        (void)(a_fDisHints); \
     11483        (void)(a_fIemHints); \
     11484    } while (0)
     11485
     11486# define IEMOP_MNEMONIC2EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints) \
     11487    do { \
     11488        IEMOP_MNEMONIC(a_Stats, a_szMnemonic); \
     11489        (void)RT_CONCAT(IEMOPFORM_, a_Form); \
     11490        (void)RT_CONCAT(OP_,a_Upper); \
     11491        (void)RT_CONCAT(OP_PARM_,a_Op1); \
     11492        (void)RT_CONCAT(OP_PARM_,a_Op2); \
     11493        (void)(a_fDisHints); \
     11494        (void)(a_fIemHints); \
     11495    } while (0)
     11496
     11497# define IEMOP_MNEMONIC3EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) \
     11498    do { \
     11499        IEMOP_MNEMONIC(a_Stats, a_szMnemonic); \
     11500        (void)RT_CONCAT(IEMOPFORM_, a_Form); \
     11501        (void)RT_CONCAT(OP_,a_Upper); \
     11502        (void)RT_CONCAT(OP_PARM_,a_Op1); \
     11503        (void)RT_CONCAT(OP_PARM_,a_Op2); \
     11504        (void)RT_CONCAT(OP_PARM_,a_Op3); \
     11505        (void)(a_fDisHints); \
     11506        (void)(a_fIemHints); \
     11507    } while (0)
     11508
     11509# define IEMOP_MNEMONIC4EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_Op4, a_fDisHints, a_fIemHints) \
     11510    do { \
     11511        IEMOP_MNEMONIC(a_Stats, a_szMnemonic); \
     11512        (void)RT_CONCAT(IEMOPFORM_, a_Form); \
     11513        (void)RT_CONCAT(OP_,a_Upper); \
     11514        (void)RT_CONCAT(OP_PARM_,a_Op1); \
     11515        (void)RT_CONCAT(OP_PARM_,a_Op2); \
     11516        (void)RT_CONCAT(OP_PARM_,a_Op3); \
     11517        (void)RT_CONCAT(OP_PARM_,a_Op4); \
     11518        (void)(a_fDisHints); \
     11519        (void)(a_fIemHints); \
     11520    } while (0)
     11521
    1146611522#else
    1146711523# define IEMOP_MNEMONIC(a_Stats, a_szMnemonic) IEMOP_INC_STATS(a_Stats)
    11468 #endif
     11524
     11525# define IEMOP_MNEMONIC0EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints) \
     11526         IEMOP_MNEMONIC(a_Stats, a_szMnemonic)
     11527# define IEMOP_MNEMONIC1EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints) \
     11528         IEMOP_MNEMONIC(a_Stats, a_szMnemonic)
     11529# define IEMOP_MNEMONIC2EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints) \
     11530         IEMOP_MNEMONIC(a_Stats, a_szMnemonic)
     11531# define IEMOP_MNEMONIC3EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) \
     11532         IEMOP_MNEMONIC(a_Stats, a_szMnemonic)
     11533# define IEMOP_MNEMONIC4EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_Op4, a_fDisHints, a_fIemHints) \
     11534         IEMOP_MNEMONIC(a_Stats, a_szMnemonic)
     11535
     11536#endif
     11537
     11538#define IEMOP_MNEMONIC0(a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints) \
     11539    IEMOP_MNEMONIC1EX(a_Lower, \
     11540                      #a_Lower, \
     11541                      a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints)
     11542#define IEMOP_MNEMONIC1(a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints) \
     11543    IEMOP_MNEMONIC1EX(RT_CONCAT3(a_Lower,_,a_Op1), \
     11544                      #a_Lower " " #a_Op1, \
     11545                      a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints)
     11546#define IEMOP_MNEMONIC2(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints) \
     11547    IEMOP_MNEMONIC2EX(RT_CONCAT5(a_Lower,_,a_Op1,_,a_Op2), \
     11548                      #a_Lower " " #a_Op1 "," #a_Op2, \
     11549                      a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints)
     11550#define IEMOP_MNEMONIC3(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) \
     11551    IEMOP_MNEMONIC3EX(RT_CONCAT7(a_Lower,_,a_Op1,_,a_Op2,_,a_Op3), \
     11552                      #a_Lower " " #a_Op1 "," #a_Op2 "," #a_Op3, \
     11553                      a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints)
     11554#define IEMOP_MNEMONIC4(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_Op4, a_fDisHints, a_fIemHints) \
     11555    IEMOP_MNEMONIC4EX(RT_CONCAT9(a_Lower,_,a_Op1,_,a_Op2,_,a_Op3,_,a_Op4), \
     11556                      #a_Lower " " #a_Op1 "," #a_Op2 "," #a_Op3 "," #a_Op4, \
     11557                      a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_Op4, a_fDisHints, a_fIemHints)
    1146911558
    1147011559/** @} */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h

    r65834 r65871  
    4040
    4141/* Instruction specification format - work in progress:  */
    42 /*
    43  *
     42
     43/**
     44 * @opcode      0x00
    4445 * @opmnemonic  add
    4546 * @op1         reg:Eb
    4647 * @op2         rm:Gb
    4748 * @opmaps      one
    48  * @oppfx       none
    49  * @opcode      0x00
    5049 * @openc       ModR/M
    51  * @opfltest    none
    5250 * @opflmodify  of,sf,zf,af,pf,cf
    53  * @opflundef   none
    54  * @opflset     none
    55  * @opflclear   none
    56  * @ophints     harmless
     51 * @ophints     harmless ignores_op_size
    5752 * @opstats     add_Eb_Gb
    5853 * @opgroup     op_gen_arith_bin
    59  * @optest                  op1=1 op2=1 -> op1=2 efl=of,sf,zf,af
    60  * @optest      o32 /   op1=0xfffffffe op2=1 -> op1=0xffffffff efl=af,pe,up
     54 * @optest      op1=1 op2=1 -> op1=2 efl=of,sf,zf,af
    6155 */
    6256FNIEMOP_DEF(iemOp_add_Eb_Gb)
    6357{
    64     IEMOP_MNEMONIC(add_Eb_Gb, "add Eb,Gb");
     58    IEMOP_MNEMONIC2(RM, ADD, add, Eb, Gb, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE);
    6559    return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rm_r8, &g_iemAImpl_add);
    6660}
     
    7064FNIEMOP_DEF(iemOp_add_Ev_Gv)
    7165{
    72     IEMOP_MNEMONIC(add_Ev_Gv, "add Ev,Gv");
     66    IEMOP_MNEMONIC2(RM, ADD, add, Ev, Gv, DISOPTYPE_HARMLESS, 0);
    7367    return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rm_rv, &g_iemAImpl_add);
    7468}
     
    7872FNIEMOP_DEF(iemOp_add_Gb_Eb)
    7973{
    80     IEMOP_MNEMONIC(add_Gb_Eb, "add Gb,Eb");
     74    IEMOP_MNEMONIC2(MR, ADD, add, Gb, Ev, DISOPTYPE_HARMLESS, 0);
    8175    return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_r8_rm, &g_iemAImpl_add);
    8276}
     
    210204}
    211205
    212 /** Opcode 0x10. */
     206/**
     207 * @opcode      0x10
     208 * @opmnemonic  adc
     209 * @op1         reg:Eb
     210 * @op2         rm:Gb
     211 * @opmaps      one
     212 * @oppfx       none
     213 * @openc       ModR/M
     214 * @opfltest    cf
     215 * @opflmodify  of,sf,zf,af,pf,cf
     216 * @ophints     harmless
     217 * @opgroup     op_gen_arith_bin
     218 * @optest      op1=1 op2=1 efl&~=cf -> op1=2 efl&|=of,sf,zf,af
     219 * @optest      op1=1 op2=1 efl|=cf  -> op1=3 efl&|=of,sf,zf,af
     220 */
    213221FNIEMOP_DEF(iemOp_adc_Eb_Gb)
    214222{
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