Lines Matching refs:instr
103 size_t DisassemblerX86::DumpInstruction(std::ostream& os, const uint8_t* instr) {
104 const uint8_t* begin_instr = instr;
109 switch (*instr) {
114 prefix[0] = *instr;
123 prefix[1] = *instr;
127 prefix[2] = *instr;
131 prefix[3] = *instr;
138 instr++;
141 uint8_t rex = (*instr >= 0x40 && *instr <= 0x4F) ? *instr : 0;
156 switch (*instr) {
218 opcode << "j" << condition_codes[*instr & 0xF];
227 instr++;
228 switch (*instr) {
244 load = *instr == 0x10;
313 opcode << StringPrintf("unknown opcode '0F 38 %02X'", *instr);
316 opcode << StringPrintf("unknown opcode '0F 3A %02X'", *instr);
320 switch (*instr) {
469 opcode << "j" << condition_codes[*instr & 0xF];
474 opcode << "set" << condition_codes[*instr & 0xF];
487 uint8_t reg_or_opcode = (instr[1] >> 3) & 7;
524 opcode << StringPrintf("unknown opcode '0F %02X'", *instr);
534 byte_operand = (*instr & 1) == 0;
535 immediate_bytes = *instr == 0x81 ? 4 : 1;
541 byte_operand = (*instr & 1) == 0;
572 immediate_bytes = ((*instr & 0xf0) == 0xc0) ? 1 : 0;
573 cx = (*instr == 0xD2) || (*instr == 0xD3);
574 byte_operand = (*instr == 0xC0);
596 immediate_bytes = ((instr[1] & 0x38) == 0) ? 1 : 0;
606 opcode << StringPrintf("unknown opcode '%02X'", *instr);
612 DumpReg(args, rex, *instr & 0x7, false, prefix[2], GPR);
614 instr++;
617 uint8_t modrm = *instr;
618 instr++;
624 address_bits = *reinterpret_cast<const uint32_t*>(instr);
626 instr += 4;
628 uint8_t sib = *instr;
629 instr++;
647 address << StringPrintf(" + %d", *reinterpret_cast<const int8_t*>(instr));
648 instr++;
650 address << StringPrintf(" + %d", *reinterpret_cast<const int32_t*>(instr));
651 instr += 4;
663 address << StringPrintf(" + %d", *reinterpret_cast<const int8_t*>(instr));
664 instr++;
666 address << StringPrintf(" + %d", *reinterpret_cast<const int32_t*>(instr));
667 instr += 4;
706 args << StringPrintf("%d", *reinterpret_cast<const int8_t*>(instr));
707 instr++;
710 args << StringPrintf("%d", *reinterpret_cast<const int32_t*>(instr));
711 instr += 4;
717 displacement = *reinterpret_cast<const int8_t*>(instr);
718 instr++;
721 displacement = *reinterpret_cast<const int32_t*>(instr);
722 instr += 4;
724 args << StringPrintf("%+d (%p)", displacement, instr + displacement);
731 for (size_t i = 0; begin_instr + i < instr; ++i) {
746 return instr - begin_instr;