reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp
 1284   dbgprintf(insn, "readModRM()");
 1286   if (insn->consumedModRM)
 1289   if (consumeByte(insn, &insn->modRM))
 1289   if (consumeByte(insn, &insn->modRM))
 1291   insn->consumedModRM = true;
 1293   mod     = modFromModRM(insn->modRM);
 1294   rm      = rmFromModRM(insn->modRM);
 1295   reg     = regFromModRM(insn->modRM);
 1302   switch (insn->registerSize) {
 1304     insn->regBase = MODRM_REG_AX;
 1305     insn->eaRegBase = EA_REG_AX;
 1308     insn->regBase = MODRM_REG_EAX;
 1309     insn->eaRegBase = EA_REG_EAX;
 1312     insn->regBase = MODRM_REG_RAX;
 1313     insn->eaRegBase = EA_REG_RAX;
 1317   reg |= rFromREX(insn->rexPrefix) << 3;
 1318   rm  |= bFromREX(insn->rexPrefix) << 3;
 1321   if (insn->vectorExtensionType == TYPE_EVEX && insn->mode == MODE_64BIT) {
 1321   if (insn->vectorExtensionType == TYPE_EVEX && insn->mode == MODE_64BIT) {
 1322     reg |= r2FromEVEX2of4(insn->vectorExtensionPrefix[1]) << 4;
 1323     evexrm = xFromEVEX2of4(insn->vectorExtensionPrefix[1]) << 4;
 1326   insn->reg = (Reg)(insn->regBase + reg);
 1326   insn->reg = (Reg)(insn->regBase + reg);
 1328   switch (insn->addressSize) {
 1335         insn->eaBase = EA_BASE_NONE;
 1336         insn->eaDisplacement = EA_DISP_16;
 1337         if (readDisplacement(insn))
 1340         insn->eaBase = (EABase)(eaBaseBase + rm);
 1341         insn->eaDisplacement = EA_DISP_NONE;
 1345       insn->eaBase = (EABase)(eaBaseBase + rm);
 1346       insn->eaDisplacement = EA_DISP_8;
 1347       insn->displacementSize = 1;
 1348       if (readDisplacement(insn))
 1352       insn->eaBase = (EABase)(eaBaseBase + rm);
 1353       insn->eaDisplacement = EA_DISP_16;
 1354       if (readDisplacement(insn))
 1358       insn->eaBase = (EABase)(insn->eaRegBase + rm);
 1358       insn->eaBase = (EABase)(insn->eaRegBase + rm);
 1359       if (readDisplacement(insn))
 1367     EABase eaBaseBase = (insn->addressSize == 4 ? EA_BASE_EAX : EA_BASE_RAX);
 1371       insn->eaDisplacement = EA_DISP_NONE; /* readSIB may override this */
 1377         insn->eaBase = (insn->addressSize == 4 ?
 1377         insn->eaBase = (insn->addressSize == 4 ?
 1379         if (readSIB(insn) || readDisplacement(insn))
 1379         if (readSIB(insn) || readDisplacement(insn))
 1383         insn->eaBase = EA_BASE_NONE;
 1384         insn->eaDisplacement = EA_DISP_32;
 1385         if (readDisplacement(insn))
 1389         insn->eaBase = (EABase)(eaBaseBase + rm);
 1394       insn->displacementSize = 1;
 1397       insn->eaDisplacement = (mod == 0x1 ? EA_DISP_8 : EA_DISP_32);
 1400         insn->eaBase = EA_BASE_sib;
 1401         if (readSIB(insn) || readDisplacement(insn))
 1401         if (readSIB(insn) || readDisplacement(insn))
 1405         insn->eaBase = (EABase)(eaBaseBase + rm);
 1406         if (readDisplacement(insn))
 1412       insn->eaDisplacement = EA_DISP_NONE;
 1413       insn->eaBase = (EABase)(insn->eaRegBase + rm + evexrm);
 1413       insn->eaBase = (EABase)(insn->eaRegBase + rm + evexrm);