Commit 65fb08e3 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[x64] Use macro list to disassemble *sd instructions

We have a macro list defined, and already use it in other places, use it
to disassemble the AVX instructions too.

Bug: v8:11879
Change-Id: Id1a5bdc167d3f17d603aa2e43e1ac80ef4b1fdb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3150139Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76759}
parent b4e15595
......@@ -1261,46 +1261,6 @@ int DisassemblerX64::AVXInstruction(byte* data) {
NameOfCPURegister(regop));
current += PrintRightAVXOperand(current);
break;
case 0x51:
AppendToBuffer("vsqrtsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x58:
AppendToBuffer("vaddsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x59:
AppendToBuffer("vmulsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x5A:
AppendToBuffer("vcvtsd2ss %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x5C:
AppendToBuffer("vsubsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x5D:
AppendToBuffer("vminsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x5E:
AppendToBuffer("vdivsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0x5F:
AppendToBuffer("vmaxsd %s,%s,", NameOfAVXRegister(regop),
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
case 0xF0:
AppendToBuffer("vlddqu %s,", NameOfAVXRegister(regop));
current += PrintRightAVXOperand(current);
......@@ -1315,6 +1275,14 @@ int DisassemblerX64::AVXInstruction(byte* data) {
NameOfAVXRegister(vvvv));
current += PrintRightAVXOperand(current);
break;
#define DISASM_SSE2_INSTRUCTION_LIST_SD(instruction, _1, _2, opcode) \
case 0x##opcode: \
AppendToBuffer("v" #instruction " %s,%s,", NameOfAVXRegister(regop), \
NameOfAVXRegister(vvvv)); \
current += PrintRightAVXOperand(current); \
break;
SSE2_INSTRUCTION_LIST_SD(DISASM_SSE2_INSTRUCTION_LIST_SD)
#undef DISASM_SSE2_INSTRUCTION_LIST_SD
default:
UnimplementedInstruction();
}
......
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