Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: src/ia32/disasm-ia32.cc

Issue 2747783004: [ia32] Supplement shift instructions for SIMD (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/disasm-ia32.cc
diff --git a/src/ia32/disasm-ia32.cc b/src/ia32/disasm-ia32.cc
index 31a0f6640f40def1a85cff54cd54bfa2966ce5b5..6d1c1727ffe16fe0dcf2a868f5dd1463501a402f 100644
--- a/src/ia32/disasm-ia32.cc
+++ b/src/ia32/disasm-ia32.cc
@@ -729,6 +729,7 @@ int DisassemblerIA32::CMov(byte* data) {
return 2 + op_size; // includes 0x0F
}
+const char* sf_str[4] = {"", "rl", "ra", "ll"};
int DisassemblerIA32::AVXInstruction(byte* data) {
byte opcode = *data;
@@ -1014,6 +1015,18 @@ int DisassemblerIA32::AVXInstruction(byte* data) {
NameOfXMMRegister(vvvv));
current += PrintRightXMMOperand(current);
break;
+ case 0x71:
+ AppendToBuffer("vps%sw %s,%s", sf_str[regop / 2],
+ NameOfXMMRegister(vvvv), NameOfXMMRegister(rm));
+ current++;
+ AppendToBuffer(",%u", *current++);
+ break;
+ case 0x72:
+ AppendToBuffer("vps%sd %s,%s", sf_str[regop / 2],
+ NameOfXMMRegister(vvvv), NameOfXMMRegister(rm));
+ current++;
+ AppendToBuffer(",%u", *current++);
+ break;
#define DECLARE_SSE_AVX_DIS_CASE(instruction, notUsed1, notUsed2, opcode) \
case 0x##opcode: { \
AppendToBuffer("v" #instruction " %s,%s,", NameOfXMMRegister(regop), \
@@ -1861,13 +1874,20 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
NameOfXMMRegister(regop),
NameOfXMMRegister(rm));
data++;
+ } else if (*data == 0x71) {
+ data++;
+ int mod, regop, rm;
+ get_modrm(*data, &mod, &regop, &rm);
+ int8_t imm8 = static_cast<int8_t>(data[1]);
+ AppendToBuffer("ps%sw %s,%d", sf_str[regop / 2],
+ NameOfXMMRegister(rm), static_cast<int>(imm8));
+ data += 2;
} else if (*data == 0x72) {
data++;
int mod, regop, rm;
get_modrm(*data, &mod, &regop, &rm);
int8_t imm8 = static_cast<int8_t>(data[1]);
- DCHECK(regop == esi || regop == edx);
- AppendToBuffer("%s %s,%d", (regop == esi) ? "pslld" : "psrld",
+ AppendToBuffer("ps%sd %s,%d", sf_str[regop / 2],
NameOfXMMRegister(rm), static_cast<int>(imm8));
data += 2;
} else if (*data == 0x73) {
@@ -1876,10 +1896,8 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
get_modrm(*data, &mod, &regop, &rm);
int8_t imm8 = static_cast<int8_t>(data[1]);
DCHECK(regop == esi || regop == edx);
- AppendToBuffer("%s %s,%d",
- (regop == esi) ? "psllq" : "psrlq",
- NameOfXMMRegister(rm),
- static_cast<int>(imm8));
+ AppendToBuffer("ps%sq %s,%d", sf_str[regop / 2],
+ NameOfXMMRegister(rm), static_cast<int>(imm8));
data += 2;
} else if (*data == 0xD3) {
data++;
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698