Commit db579b2e authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

Fix palignr immediate disasm

The immediate value was incorrect and-ed with 3.

Also, for palignr, if the immediate is larger that 32
(for 128-bit) or 16 (for 64-bit), it produces a zero result.
In the case of disasm, I don't think we need to do anything.

Change-Id: I258fd16fbe57fa7e00ab306d0fbf1b1b73950566
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1876660Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64524}
parent 845f0633
......@@ -1747,7 +1747,7 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
get_modrm(*current, &mod, &regop, &rm);
AppendToBuffer("palignr %s,", NameOfXMMRegister(regop));
current += PrintRightXMMOperand(current);
AppendToBuffer(",0x%x", (*current) & 3);
AppendToBuffer(",0x%x", (*current));
current += 1;
} else if (third_byte == 0x14) {
get_modrm(*current, &mod, &regop, &rm);
......@@ -1780,7 +1780,7 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
// insertps xmm, xmm/m32, imm8
AppendToBuffer("insertps %s,", NameOfXMMRegister(regop));
current += PrintRightXMMOperand(current);
AppendToBuffer(",0x%x", (*current) & 3);
AppendToBuffer(",0x%x", (*current));
current += 1;
} else if (third_byte == 0x22) {
get_modrm(*current, &mod, &regop, &rm);
......
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