Changeset 65871 in vbox
- Timestamp:
- Feb 23, 2017 10:23:29 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113646
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r65758 r65871 350 350 $(PATH_SUB_CURRENT)/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h 351 351 $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,$<) 352 $(QUIET)$(RM) -f -- "[email protected]" "[email protected]" "[email protected]" 352 353 $(QUIET)$(MKDIR) -p -- "$(dir $@)" 353 354 $(QUIET)$(SED) \ 354 -e '/IEMOP_MNEMONIC (/!d' \355 -e 's/^.*IEMOP_MNEMONIC (/IEM_DO_INSTR_STAT(/' \355 -e '/IEMOP_MNEMONIC[01234]*(/!d' \ 356 -e 's/^.*IEMOP_MNEMONIC\([01234]*\)(/IEM_DO_INSTR_STAT\1(/' \ 356 357 -e 's/;.*$(DOLLAR)//' \ 357 358 --output "[email protected]" $(filter %.cpp.h,$^) 358 $(QUIET)$(REDIRECT) -wto "$@" -- sort "[email protected]" 359 $(QUIET)$(RM) -f -- "[email protected]" 359 # Windows sort does some kind of seeking. So, we must use a temporary file and kmk_cat to define and undefine our macros. 360 $(QUIET)$(REDIRECT) -wto "[email protected]" -- sort "[email protected]" 361 $(QUIET)$(APPEND) -nt "$@" \ 362 '/* Warning autogenerated by VMM/Makefile.kmk. */ ' \ 363 '#define IEM_DO_INSTR_STAT0(f,u,l,fd,fi) IEM_DO_INSTR_STAT(l, #l)' \ 364 '#define IEM_DO_INSTR_STAT1(f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1, #l " " #o1)' \ 365 '#define IEM_DO_INSTR_STAT2(f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2, #l " " #o1 "," #o2)' \ 366 '#define IEM_DO_INSTR_STAT3(f,u,l,o1,o2,o3,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2 ## _ ## o3, #l " " #o1 "," #o2 "," #o3)' \ 367 '#define IEM_DO_INSTR_STAT4(f,u,l,o1,o2,o3,o4,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2 ## _ ## o3 ## _ ## o4, #l " " #o1 "," #o2 "," #o3 "," #o4)' \ 368 '#define IEM_DO_INSTR_STAT0EX(s,m,f,u,l,fd,fi) IEM_DO_INSTR_STAT(s,m)' \ 369 '#define IEM_DO_INSTR_STAT1EX(s,m,f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(s,m)' \ 370 '#define IEM_DO_INSTR_STAT2EX(s,m,f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(s,m)' \ 371 '#define IEM_DO_INSTR_STAT3EX(s,m,f,u,l,o1,o2,o3,fd,fi) IEM_DO_INSTR_STAT(s,m)' \ 372 '#define IEM_DO_INSTR_STAT4EX(s,m,f,u,l,o1,o2,o3,o4,fd,fi) IEM_DO_INSTR_STAT(s,m)' \ 373 '' 374 $(QUIET)$(REDIRECT) -ato "$@" -- $(CAT_EXT) "[email protected]" 375 $(QUIET)$(APPEND) -n "$@" \ 376 '' \ 377 '#undef IEM_DO_INSTR_STAT0' \ 378 '#undef IEM_DO_INSTR_STAT1' \ 379 '#undef IEM_DO_INSTR_STAT2' \ 380 '#undef IEM_DO_INSTR_STAT3' \ 381 '#undef IEM_DO_INSTR_STAT4' \ 382 '' 383 $(QUIET)$(RM) -f -- "[email protected]" "[email protected]" 360 384 $(QUIET)$(CP) -v -f --changed -- "$@" "$(patsubst %.ts,%,$@)" 361 385 -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r65793 r65871 11464 11464 pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK ? "lock " : "", a_szMnemonic, pVCpu->iem.s.cInstructions)); \ 11465 11465 } 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 11466 11522 #else 11467 11523 # 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) 11469 11558 11470 11559 /** @} */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h
r65834 r65871 40 40 41 41 /* Instruction specification format - work in progress: */ 42 /* 43 * 42 43 /** 44 * @opcode 0x00 44 45 * @opmnemonic add 45 46 * @op1 reg:Eb 46 47 * @op2 rm:Gb 47 48 * @opmaps one 48 * @oppfx none49 * @opcode 0x0050 49 * @openc ModR/M 51 * @opfltest none52 50 * @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 57 52 * @opstats add_Eb_Gb 58 53 * @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 61 55 */ 62 56 FNIEMOP_DEF(iemOp_add_Eb_Gb) 63 57 { 64 IEMOP_MNEMONIC (add_Eb_Gb, "add Eb,Gb");58 IEMOP_MNEMONIC2(RM, ADD, add, Eb, Gb, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZE); 65 59 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rm_r8, &g_iemAImpl_add); 66 60 } … … 70 64 FNIEMOP_DEF(iemOp_add_Ev_Gv) 71 65 { 72 IEMOP_MNEMONIC (add_Ev_Gv, "add Ev,Gv");66 IEMOP_MNEMONIC2(RM, ADD, add, Ev, Gv, DISOPTYPE_HARMLESS, 0); 73 67 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rm_rv, &g_iemAImpl_add); 74 68 } … … 78 72 FNIEMOP_DEF(iemOp_add_Gb_Eb) 79 73 { 80 IEMOP_MNEMONIC (add_Gb_Eb, "add Gb,Eb");74 IEMOP_MNEMONIC2(MR, ADD, add, Gb, Ev, DISOPTYPE_HARMLESS, 0); 81 75 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_r8_rm, &g_iemAImpl_add); 82 76 } … … 210 204 } 211 205 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 */ 213 221 FNIEMOP_DEF(iemOp_adc_Eb_Gb) 214 222 { -
trunk/src/VBox/VMM/include/IEMInternal.h
r65764 r65871 843 843 /** @} */ 844 844 845 /** @name Opcode forms 845 /** @name IEMOPFORM_XXX - Opcode forms 846 * @note These are ORed together with IEMOPHINT_XXX. 846 847 * @{ */ 847 848 /** ModR/M: reg, r/m */ … … 875 876 /** @} */ 876 877 878 /** @name IEMOPHINT_XXX - Additional Opcode Hints 879 * @note These are ORed together with IEMOPFORM_XXX. 880 * @{ */ 881 /** Both the operand size prefixes are ignored. */ 882 #define IEMOPHINT_IGNORES_OP_SIZE RT_BIT_32(10) 883 /** @} */ 884 877 885 /** 878 886 * Possible hardware task switch sources. -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r65598 r65871 128 128 #define IEMOP_RAISE_INVALID_LOCK_PREFIX() VERR_TRPM_ACTIVE_TRAP 129 129 #define IEMOP_MNEMONIC(a_Stats, a_szMnemonic) do { } while (0) 130 #define IEMOP_MNEMONIC0EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints) do { } while (0) 131 #define IEMOP_MNEMONIC1EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints) do { } while (0) 132 #define IEMOP_MNEMONIC2EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints) do { } while (0) 133 #define IEMOP_MNEMONIC3EX(a_Stats, a_szMnemonic, a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) do { } while (0) 134 #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) do { } while (0) 135 #define IEMOP_MNEMONIC0(a_Form, a_Upper, a_Lower, a_fDisHints, a_fIemHints) do { } while (0) 136 #define IEMOP_MNEMONIC1(a_Form, a_Upper, a_Lower, a_Op1, a_fDisHints, a_fIemHints) do { } while (0) 137 #define IEMOP_MNEMONIC2(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_fDisHints, a_fIemHints) do { } while (0) 138 #define IEMOP_MNEMONIC3(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) do { } while (0) 139 #define IEMOP_MNEMONIC4(a_Form, a_Upper, a_Lower, a_Op1, a_Op2, a_Op3, a_fDisHints, a_fIemHints) do { } while (0) 130 140 #define IEMOP_BITCH_ABOUT_STUB() do { } while (0) 131 141 #define FNIEMOP_STUB(a_Name) \
Note:
See TracChangeset
for help on using the changeset viewer.