llvm.org GIT mirror llvm / baf2494
[X86][Disassembler] Use a local variable instead of using a field in the instruction object. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333721 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 2 years ago
2 changed file(s) with 11 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
13481348 insn->reg = (Reg)(insn->regBase + reg);
13491349
13501350 switch (insn->addressSize) {
1351 case 2:
1352 insn->eaBaseBase = EA_BASE_BX_SI;
1351 case 2: {
1352 EABase eaBaseBase = EA_BASE_BX_SI;
13531353
13541354 switch (mod) {
13551355 case 0x0:
13591359 if (readDisplacement(insn))
13601360 return -1;
13611361 } else {
1362 insn->eaBase = (EABase)(insn->eaBaseBase + rm);
1362 insn->eaBase = (EABase)(eaBaseBase + rm);
13631363 insn->eaDisplacement = EA_DISP_NONE;
13641364 }
13651365 break;
13661366 case 0x1:
1367 insn->eaBase = (EABase)(insn->eaBaseBase + rm);
1367 insn->eaBase = (EABase)(eaBaseBase + rm);
13681368 insn->eaDisplacement = EA_DISP_8;
13691369 insn->displacementSize = 1;
13701370 if (readDisplacement(insn))
13711371 return -1;
13721372 break;
13731373 case 0x2:
1374 insn->eaBase = (EABase)(insn->eaBaseBase + rm);
1374 insn->eaBase = (EABase)(eaBaseBase + rm);
13751375 insn->eaDisplacement = EA_DISP_16;
13761376 if (readDisplacement(insn))
13771377 return -1;
13831383 break;
13841384 }
13851385 break;
1386 }
13861387 case 4:
1387 case 8:
1388 insn->eaBaseBase = (insn->addressSize == 4 ? EA_BASE_EAX : EA_BASE_RAX);
1388 case 8: {
1389 EABase eaBaseBase = (insn->addressSize == 4 ? EA_BASE_EAX : EA_BASE_RAX);
13891390
13901391 switch (mod) {
13911392 case 0x0:
14071408 return -1;
14081409 break;
14091410 default:
1410 insn->eaBase = (EABase)(insn->eaBaseBase + rm);
1411 insn->eaBase = (EABase)(eaBaseBase + rm);
14111412 break;
14121413 }
14131414 break;
14231424 return -1;
14241425 break;
14251426 default:
1426 insn->eaBase = (EABase)(insn->eaBaseBase + rm);
1427 insn->eaBase = (EABase)(eaBaseBase + rm);
14271428 if (readDisplacement(insn))
14281429 return -1;
14291430 break;
14351436 break;
14361437 }
14371438 break;
1439 }
14381440 } /* switch (insn->addressSize) */
14391441
14401442 return 0;
626626
627627 // These fields determine the allowable values for the ModR/M fields, which
628628 // depend on operand and address widths.
629 EABase eaBaseBase;
630629 EABase eaRegBase;
631630 Reg regBase;
632631