Commit b93382d9 authored by whesse@chromium.org's avatar whesse@chromium.org

Add test_b(Operand, imm8) to ia32 disassembler.

Review URL: http://codereview.chromium.org/2765001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent baf100fc
......@@ -924,14 +924,18 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
break;
case 0xF6:
{ int mod, regop, rm;
get_modrm(*(data+1), &mod, &regop, &rm);
if (mod == 3 && regop == eax) {
AppendToBuffer("test_b %s,%d", NameOfCPURegister(rm), *(data+2));
{ data++;
int mod, regop, rm;
get_modrm(*data, &mod, &regop, &rm);
if (regop == eax) {
AppendToBuffer("test_b ");
data += PrintRightOperand(data);
int32_t imm = *data;
AppendToBuffer(",0x%x", imm);
data++;
} else {
UnimplementedInstruction();
}
data += 3;
}
break;
......
......@@ -244,6 +244,9 @@ TEST(DisasmIa320) {
__ test(edx, Immediate(12345));
__ test(edx, Operand(ebx, ecx, times_8, 10000));
__ test(Operand(esi, edi, times_1, -20000000), Immediate(300000000));
__ test_b(edx, Operand(ecx, ebx, times_2, 1000));
__ test_b(Operand(eax, -20), 0x9A);
__ nop();
__ xor_(edx, 12345);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment