Home | History | Annotate | Download | only in x64

Lines Matching full:data

23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
386 void get_modrm(byte data,
390 *mod = (data >> 6) & 3;
391 *regop = ((data & 0x38) >> 3) | (rex_r() ? 8 : 0);
392 *rm = (data & 7) | (rex_b() ? 8 : 0);
395 void get_sib(byte data,
399 *scale = (data >> 6) & 3;
400 *index = ((data >> 3) & 7) | (rex_x() ? 8 : 0);
401 *base = (data & 7) | (rex_b() ? 8 : 0);
413 byte* data);
414 int PrintImmediate(byte* data, OperandSize size);
415 int PrintImmediateOp(byte* data);
417 int TwoByteOpcodeInstruction(byte* data);
418 int F6F7Instruction(byte* data);
419 int ShiftInstruction(byte* data);
420 int JumpShort(byte* data);
421 int JumpConditional(byte* data);
422 int JumpConditionalShort(byte* data);
423 int SetCC(byte* data);
424 int FPUInstruction(byte* data);
546 int DisassemblerX64::PrintImmediate(byte* data, OperandSize size) {
551 value = *data;
555 value = *reinterpret_cast<int16_t*>(data);
559 value = *reinterpret_cast<uint32_t*>(data);
563 value = *reinterpret_cast<int32_t*>(data);
594 // Returns number of bytes used including the current *data.
598 byte* data) {
599 byte modrm = *data;
612 advance = byte_size_operand_ ? PrintRightByteOperand(data)
613 : PrintRightOperand(data);
618 advance = byte_size_operand_ ? PrintRightByteOperand(data)
619 : PrintRightOperand(data);
631 // Returns number of bytes used by machine instruction, including *data byte.
633 int DisassemblerX64::PrintImmediateOp(byte* data) {
634 bool byte_size_immediate = (*data & 0x02) != 0;
635 byte modrm = *(data + 1);
665 int count = PrintRightOperand(data + 1);
668 count += PrintImmediate(data + 1 + count, immediate_size);
673 // Returns number of bytes used, including *data.
674 int DisassemblerX64::F6F7Instruction(byte* data) {
675 ASSERT(*data == 0xF7 || *data == 0xF6);
676 byte modrm = *(data + 1);
704 int count = PrintRightOperand(data + 1); // Use name of 64-bit register.
706 count += PrintImmediate(data + 1 + count, operand_size());
715 int DisassemblerX64::ShiftInstruction(byte* data) {
716 byte op = *data & (~1);
721 byte modrm = *(data + 1);
762 imm8 = *(data + 2);
779 // Returns number of bytes used, including *data.
780 int DisassemblerX64::JumpShort(byte* data) {
781 ASSERT_EQ(0xEB, *data);
782 byte b = *(data + 1);
783 byte* dest = data + static_cast<int8_t>(b) + 2;
789 // Returns number of bytes used, including *data.
790 int DisassemblerX64::JumpConditional(byte* data) {
791 ASSERT_EQ(0x0F, *data);
792 byte cond = *(data + 1) & 0x0F;
793 byte* dest = data + *reinterpret_cast<int32_t*>(data + 2) + 6;
800 // Returns number of bytes used, including *data.
801 int DisassemblerX64::JumpConditionalShort(byte* data) {
802 byte cond = *data & 0x0F;
803 byte b = *(data + 1);
804 byte* dest = data + static_cast<int8_t>(b) + 2;
811 // Returns number of bytes used, including *data.
812 int DisassemblerX64::SetCC(byte* data) {
813 ASSERT_EQ(0x0F, *data);
814 byte cond = *(data + 1) & 0x0F;
817 PrintRightByteOperand(data + 2);
822 // Returns number of bytes used, including *data.
823 int DisassemblerX64::FPUInstruction(byte* data) {
824 byte escape_opcode = *data;
826 byte modrm_byte = *(data+1);
831 return MemoryFPUInstruction(escape_opcode, modrm_byte, data+1);
991 int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
992 byte opcode = *(data + 1);
993 byte* current = data + 2;
1076 current = data + JumpConditional(data);
1085 current = data + SetCC(data);
1101 return static_cast<int>(current - data);
1152 byte* data = instr;
1159 current = *data;
1170 data++;
1188 data++;
1192 data++;
1193 data += PrintOperands(idesc.mnem, idesc.op_order_, data);
1197 data += JumpConditionalShort(data);
1205 data++;
1211 data++;
1217 addr = reinterpret_cast<byte*>(*reinterpret_cast<int16_t*>(data + 1));
1218 data += 3;
1221 addr = reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data + 1));
1222 data += 5;
1225 addr = reinterpret_cast<byte*>(*reinterpret_cast<int64_t*>(data + 1));
1226 data += 9;
1239 byte* addr = data + *reinterpret_cast<int32_t*>(data + 1) + 5;
1241 data += 5;
1247 reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data + 1));
1249 data += 5;
1264 switch (*data) {
1266 AppendToBuffer("ret 0x%x", *reinterpret_cast<uint16_t*>(data + 1));
1267 data += 3;
1273 get_modrm(*(data + 1), &mod, &regop, &rm);
1274 int32_t imm = *data == 0x6B ? *(data + 2)
1275 : *reinterpret_cast<int32_t*>(data + 2);
1278 data += 2 + (*data == 0x6B ? 1 : 4);
1284 data += PrintImmediateOp(data);
1288 data += TwoByteOpcodeInstruction(data);
1292 data++;
1294 get_modrm(*data, &mod, &regop, &rm);
1297 data += PrintRightOperand(data);
1303 data++;
1305 get_modrm(*data, &mod, &regop, &rm);
1329 data += PrintRightOperand(data);
1336 bool is_byte = *data == 0xC6;
1337 data++;
1340 data += PrintRightOperand(data);
1341 int32_t imm = is_byte ? *data : *reinterpret_cast<int32_t*>(data);
1343 data += is_byte ? 1 : 4;
1348 data++;
1350 data += PrintRightOperand(data);
1351 int32_t imm = *data;
1353 data++;
1360 bool is_byte = *data == 0x88;
1362 data++;
1363 get_modrm(*data, &mod, &regop, &rm);
1365 data += PrintRightOperand(data);
1378 int reg = (*data & 0x7) | (rex_b() ? 8 : 0);
1386 data++;
1391 data++;
1393 get_modrm(*data, &mod, &regop, &rm);
1399 data++;
1404 AppendToBuffer("push 0x%x", *reinterpret_cast<int32_t*>(data + 1));
1405 data += 5;
1409 AppendToBuffer("push 0x%x", *reinterpret_cast<int8_t*>(data + 1));
1410 data += 2;
1419 *reinterpret_cast<int32_t*>(data + 1)));
1420 if (*data == 0xA1) { // Opcode 0xA1
1425 data += 5;
1431 *reinterpret_cast<byte**>(data + 1));
1432 if (*data == 0xA1) { // Opcode 0xA1
1437 data += 9;
1442 data += 2;
1447 AppendToBuffer("test al,0x%x", *reinterpret_cast<uint8_t*>(data + 1));
1448 data += 2;
1455 value = *reinterpret_cast<uint16_t*>(data + 1);
1456 data += 3;
1459 value = *reinterpret_cast<uint32_t*>(data + 1);
1460 data += 5;
1463 value = *reinterpret_cast<int32_t*>(data + 1);
1464 data += 5;
1477 data += ShiftInstruction(data);
1483 data += ShiftInstruction(data);
1493 data += FPUInstruction(data);
1497 data += JumpShort(data);
1503 data += F6F7Instruction(data);
1508 data += 1;
1516 int instr_len = static_cast<int>(data - instr);
1521 for (byte* bp = instr; bp < data; bp++) {