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
This commit is contained in:
whesse@chromium.org 2010-06-08 12:44:24 +00:00
parent baf100fc48
commit b93382d9ff
2 changed files with 12 additions and 5 deletions

View File

@ -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;

View File

@ -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);