Commit d16c822b authored by ahaas's avatar ahaas Committed by Commit bot

Added the bsf instruction to the disassembler of x64 and ia32.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1418183002

Cr-Commit-Position: refs/heads/master@{#31487}
parent 6256e1dc
......@@ -1231,6 +1231,8 @@ static const char* F0Mnem(byte f0byte) {
case 0xAD: return "shrd";
case 0xAC: return "shrd"; // 3-operand version.
case 0xAB: return "bts";
case 0xBC:
return "bsf";
case 0xBD: return "bsr";
default: return NULL;
}
......@@ -1482,6 +1484,12 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
} else {
AppendToBuffer(",%s,cl", NameOfCPURegister(regop));
}
} else if (f0byte == 0xBC) {
data += 2;
int mod, regop, rm;
get_modrm(*data, &mod, &regop, &rm);
AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop));
data += PrintRightOperand(data);
} else if (f0byte == 0xBD) {
data += 2;
int mod, regop, rm;
......
......@@ -1824,6 +1824,12 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
} else {
AppendToBuffer(",%s,cl", NameOfCPURegister(regop));
}
} else if (opcode == 0xBC) {
AppendToBuffer("%s%c ", mnemonic, operand_size_code());
int mod, regop, rm;
get_modrm(*current, &mod, &regop, &rm);
AppendToBuffer("%s,", NameOfCPURegister(regop));
current += PrintRightOperand(current);
} else if (opcode == 0xBD) {
AppendToBuffer("%s%c ", mnemonic, operand_size_code());
int mod, regop, rm;
......@@ -1878,6 +1884,8 @@ const char* DisassemblerX64::TwoByteMnemonic(byte opcode) {
return "movzxb";
case 0xB7:
return "movzxw";
case 0xBC:
return "bsf";
case 0xBD:
return "bsr";
case 0xBE:
......
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