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

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

Issue 2170323002: [x64]: add cmpps/cmppd instructions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: src/x64/disasm-x64.cc
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc
index 47c2371da14c62ee0d64037ce0325d47558f1d5c..3845ab8436935c72f188385cdfa5edd02abf1282 100644
--- a/src/x64/disasm-x64.cc
+++ b/src/x64/disasm-x64.cc
@@ -1259,6 +1259,16 @@ int DisassemblerX64::AVXInstruction(byte* data) {
NameOfXMMRegister(vvvv));
current += PrintRightXMMOperand(current);
break;
+ case 0xC2: {
+ AppendToBuffer("vcmpps %s,%s,", NameOfXMMRegister(regop),
+ NameOfXMMRegister(vvvv));
+ current += PrintRightXMMOperand(current);
+ const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
+ "neq", "nlt", "nle", "ord"};
+ AppendToBuffer(", (%s)", pseudo_op[*current]);
+ current += 1;
+ break;
+ }
default:
UnimplementedInstruction();
}
@@ -1328,6 +1338,16 @@ int DisassemblerX64::AVXInstruction(byte* data) {
current += PrintRightOperand(current);
AppendToBuffer(",%s", NameOfXMMRegister(regop));
break;
+ case 0xC2: {
+ AppendToBuffer("vcmppd %s,%s,", NameOfXMMRegister(regop),
+ NameOfXMMRegister(vvvv));
+ current += PrintRightXMMOperand(current);
+ const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
+ "neq", "nlt", "nle", "ord"};
+ AppendToBuffer(", (%s)", pseudo_op[*current]);
+ current += 1;
+ break;
+ }
default:
UnimplementedInstruction();
}
@@ -1680,11 +1700,19 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
mnemonic = "psubd";
} else if (opcode == 0xFE) {
mnemonic = "paddd";
+ } else if (opcode == 0xC2) {
+ mnemonic = "cmppd";
} else {
UnimplementedInstruction();
}
AppendToBuffer("%s %s,", mnemonic, NameOfXMMRegister(regop));
current += PrintRightXMMOperand(current);
+ if (opcode == 0xC2) {
+ const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
+ "neq", "nlt", "nle", "ord"};
+ AppendToBuffer(", (%s)", pseudo_op[*current]);
+ current += 1;
+ }
}
}
} else if (group_1_prefix_ == 0xF2) {
@@ -1896,12 +1924,12 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) {
// cmpps xmm, xmm/m128, imm8
int mod, regop, rm;
get_modrm(*current, &mod, &regop, &rm);
- const char* const pseudo_op[] = {"cmpeqps", "cmpltps", "cmpleps",
- "cmpunordps", "cmpneqps", "cmpnltps",
- "cmpnleps", "cmpordps"};
- AppendToBuffer("%s %s,%s", pseudo_op[current[1]], NameOfXMMRegister(regop),
- NameOfXMMRegister(rm));
- current += 2;
+ const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
+ "neq", "nlt", "nle", "ord"};
+ AppendToBuffer("cmpps %s, ", NameOfXMMRegister(regop));
+ current += PrintRightXMMOperand(current);
+ AppendToBuffer(", %s", pseudo_op[*current]);
+ current += 1;
} else if (opcode == 0xC6) {
// shufps xmm, xmm/m128, imm8
int mod, regop, rm;

Powered by Google App Engine
This is Rietveld 408576698