Changeset 9131 in vbox for trunk/src/VBox
- Timestamp:
- May 26, 2008 4:02:50 PM (17 years ago)
- Location:
- trunk/src/VBox/Disassembler
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r9097 r9131 466 466 467 467 // Should contain the parameter type on input 468 pCpu->param1.parval = fpop->param1;469 pCpu->param2.parval = fpop->param2;470 #if 1 /** @todo bird: why parval above? fmul and similar needs dword/qword data in param. */471 468 pCpu->param1.param = fpop->param1; 472 469 pCpu->param2.param = fpop->param2; 473 #endif474 470 } 475 471 else … … 747 743 { /* SIB byte follows ModRM */ 748 744 UseSIB(lpszCodeBlock, pOp, pParam, pCpu); 749 pParam->flags |= USE_EFFICIENT_ADDRESS;750 745 } 751 746 else … … 755 750 if (pCpu->mode == CPUMODE_32BIT) 756 751 { 757 pParam->flags |= USE_DISPLACEMENT32 | USE_EFFICIENT_ADDRESS;752 pParam->flags |= USE_DISPLACEMENT32; 758 753 pParam->disp32 = pCpu->disp; 759 754 disasmPrintDisp32(pParam); … … 761 756 else 762 757 { 763 pParam->flags |= USE_RIPDISPLACEMENT32 | USE_EFFICIENT_ADDRESS;758 pParam->flags |= USE_RIPDISPLACEMENT32; 764 759 pParam->disp32 = pCpu->disp; 765 760 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "RIP+"); … … 768 763 } 769 764 else {//register address 770 pParam->flags |= USE_BASE | USE_EFFICIENT_ADDRESS;765 pParam->flags |= USE_BASE; 771 766 disasmModRMReg(pCpu, pOp, rm, pParam, 1); 772 767 } … … 786 781 } 787 782 pParam->disp8 = pCpu->disp; 788 pParam->flags |= USE_DISPLACEMENT8 | USE_EFFICIENT_ADDRESS;783 pParam->flags |= USE_DISPLACEMENT8; 789 784 790 785 if (pParam->disp8 != 0) … … 809 804 } 810 805 pParam->disp32 = pCpu->disp; 811 pParam->flags |= USE_DISPLACEMENT32 | USE_EFFICIENT_ADDRESS;806 pParam->flags |= USE_DISPLACEMENT32; 812 807 813 808 if (pParam->disp32 != 0) … … 834 829 {//16 bits displacement 835 830 pParam->disp16 = pCpu->disp; 836 pParam->flags |= USE_DISPLACEMENT16 | USE_EFFICIENT_ADDRESS;831 pParam->flags |= USE_DISPLACEMENT16; 837 832 disasmPrintDisp16(pParam); 838 833 } 839 834 else 840 835 { 841 pParam->flags |= USE_BASE | USE_EFFICIENT_ADDRESS;836 pParam->flags |= USE_BASE; 842 837 disasmModRMReg16(pCpu, pOp, rm, pParam); 843 838 } … … 850 845 disasmModRMReg16(pCpu, pOp, rm, pParam); 851 846 pParam->disp8 = pCpu->disp; 852 pParam->flags |= USE_BASE | USE_DISPLACEMENT8 | USE_EFFICIENT_ADDRESS;847 pParam->flags |= USE_BASE | USE_DISPLACEMENT8; 853 848 854 849 if (pParam->disp8 != 0) … … 866 861 disasmModRMReg16(pCpu, pOp, rm, pParam); 867 862 pParam->disp16 = pCpu->disp; 868 pParam->flags |= USE_BASE | USE_DISPLACEMENT16 | USE_EFFICIENT_ADDRESS;863 pParam->flags |= USE_BASE | USE_DISPLACEMENT16; 869 864 870 865 if (pParam->disp16 != 0) -
trunk/src/VBox/Disassembler/DisasmReg.cpp
r9011 r9131 474 474 memset(pParamVal, 0, sizeof(*pParamVal)); 475 475 476 if ( pParam->flags & (USE_BASE|USE_INDEX|USE_DISPLACEMENT32|USE_DISPLACEMENT16|USE_DISPLACEMENT8|USE_RIPDISPLACEMENT32))476 if (DIS_IS_EFFECTIVE_ADDR(pParam->flags)) 477 477 { 478 478 // Effective address -
trunk/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
r9101 r9131 547 547 */ 548 548 if ( (pCpu->prefix & PREFIX_SEG) 549 && ! (pCpu->param1.flags & USE_EFFICIENT_ADDRESS)550 && ! (pCpu->param2.flags & USE_EFFICIENT_ADDRESS)551 && ! (pCpu->param3.flags & USE_EFFICIENT_ADDRESS))549 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param1.flags) 550 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param2.flags) 551 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param3.flags)) 552 552 { 553 553 PUT_STR(s_szSegPrefix[pCpu->prefix_seg], 2); … … 600 600 601 601 PUT_FAR(); 602 if ( pParam->flags & USE_EFFICIENT_ADDRESS)602 if (DIS_IS_EFFECTIVE_ADDR(pParam->flags)) 603 603 { 604 604 /* Work around mov seg,[mem16] and mov [mem16],seg as these always make a 16-bit mem … … 623 623 PUT_SZ("dword "); 624 624 } 625 if ( pParam->flags & USE_EFFICIENT_ADDRESS)625 if (DIS_IS_EFFECTIVE_ADDR(pParam->flags)) 626 626 PUT_SEGMENT_OVERRIDE(); 627 627 628 628 bool fBase = (pParam->flags & USE_BASE) /* When exactly is USE_BASE supposed to be set? disasmModRMReg doesn't set it. */ 629 629 || ( (pParam->flags & (USE_REG_GEN8 | USE_REG_GEN16 | USE_REG_GEN32 | USE_REG_GEN64)) 630 && ! (pParam->flags & USE_EFFICIENT_ADDRESS));630 && !DIS_IS_EFFECTIVE_ADDR(pParam->flags)); 631 631 if (fBase) 632 632 { … … 683 683 } 684 684 685 if ( pParam->flags & USE_EFFICIENT_ADDRESS)685 if (DIS_IS_EFFECTIVE_ADDR(pParam->flags)) 686 686 PUT_C(']'); 687 687 break; … … 1068 1068 if (fPrefixes & PREFIX_SEG) 1069 1069 { 1070 /* no eff icientaddress which it may apply to. */1070 /* no effective address which it may apply to. */ 1071 1071 Assert((pState->Cpu.prefix & PREFIX_SEG) || pState->Cpu.mode == CPUMODE_64BIT); 1072 if ( ! (pState->Cpu.param1.flags & USE_EFFICIENT_ADDRESS)1073 && ! (pState->Cpu.param2.flags & USE_EFFICIENT_ADDRESS)1074 && ! (pState->Cpu.param3.flags & USE_EFFICIENT_ADDRESS))1072 if ( !DIS_IS_EFFECTIVE_ADDR(pState->Cpu.param1.flags) 1073 && !DIS_IS_EFFECTIVE_ADDR(pState->Cpu.param2.flags) 1074 && !DIS_IS_EFFECTIVE_ADDR(pState->Cpu.param3.flags)) 1075 1075 return true; 1076 1076 }
Note:
See TracChangeset
for help on using the changeset viewer.