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

Side by Side Diff: src/ia32/disasm-ia32.cc

Issue 2847683002: [ia32] Add cmpps/vcmpps for eq/lt/le/neq (Closed)
Patch Set: Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <assert.h> 5 #include <assert.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 case 0x5E: 1021 case 0x5E:
1022 AppendToBuffer("vdivps %s,%s,", NameOfXMMRegister(regop), 1022 AppendToBuffer("vdivps %s,%s,", NameOfXMMRegister(regop),
1023 NameOfXMMRegister(vvvv)); 1023 NameOfXMMRegister(vvvv));
1024 current += PrintRightXMMOperand(current); 1024 current += PrintRightXMMOperand(current);
1025 break; 1025 break;
1026 case 0x5F: 1026 case 0x5F:
1027 AppendToBuffer("vmaxps %s,%s,", NameOfXMMRegister(regop), 1027 AppendToBuffer("vmaxps %s,%s,", NameOfXMMRegister(regop),
1028 NameOfXMMRegister(vvvv)); 1028 NameOfXMMRegister(vvvv));
1029 current += PrintRightXMMOperand(current); 1029 current += PrintRightXMMOperand(current);
1030 break; 1030 break;
1031 case 0xC2: {
1032 const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
1033 "neq", "nlt", "nle", "ord"};
1034 AppendToBuffer("vcmpps %s,%s,", NameOfXMMRegister(regop),
1035 NameOfXMMRegister(vvvv));
1036 current += PrintRightXMMOperand(current);
1037 AppendToBuffer(", (%s)", pseudo_op[*current]);
1038 current++;
1039 break;
1040 }
1031 default: 1041 default:
1032 UnimplementedInstruction(); 1042 UnimplementedInstruction();
1033 } 1043 }
1034 } else if (vex_66() && vex_0f()) { 1044 } else if (vex_66() && vex_0f()) {
1035 int mod, regop, rm, vvvv = vex_vreg(); 1045 int mod, regop, rm, vvvv = vex_vreg();
1036 get_modrm(*current, &mod, &regop, &rm); 1046 get_modrm(*current, &mod, &regop, &rm);
1037 switch (opcode) { 1047 switch (opcode) {
1038 case 0x54: 1048 case 0x54:
1039 AppendToBuffer("vandpd %s,%s,", NameOfXMMRegister(regop), 1049 AppendToBuffer("vandpd %s,%s,", NameOfXMMRegister(regop),
1040 NameOfXMMRegister(vvvv)); 1050 NameOfXMMRegister(vvvv));
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 NameOfXMMRegister(regop)); 1572 NameOfXMMRegister(regop));
1563 data += PrintRightXMMOperand(data); 1573 data += PrintRightXMMOperand(data);
1564 } else if (f0byte == 0x50) { 1574 } else if (f0byte == 0x50) {
1565 data += 2; 1575 data += 2;
1566 int mod, regop, rm; 1576 int mod, regop, rm;
1567 get_modrm(*data, &mod, &regop, &rm); 1577 get_modrm(*data, &mod, &regop, &rm);
1568 AppendToBuffer("movmskps %s,%s", 1578 AppendToBuffer("movmskps %s,%s",
1569 NameOfCPURegister(regop), 1579 NameOfCPURegister(regop),
1570 NameOfXMMRegister(rm)); 1580 NameOfXMMRegister(rm));
1571 data++; 1581 data++;
1582 } else if (f0byte == 0xC2) {
1583 data += 2;
1584 int mod, regop, rm;
1585 get_modrm(*data, &mod, &regop, &rm);
1586 const char* const pseudo_op[] = {"eq", "lt", "le", "unord",
1587 "neq", "nlt", "nle", "ord"};
1588 AppendToBuffer("cmpps %s, ", NameOfXMMRegister(regop));
1589 data += PrintRightXMMOperand(data);
1590 AppendToBuffer(", (%s)", pseudo_op[*data]);
1591 data++;
1572 } else if (f0byte== 0xC6) { 1592 } else if (f0byte== 0xC6) {
1573 // shufps xmm, xmm/m128, imm8 1593 // shufps xmm, xmm/m128, imm8
1574 data += 2; 1594 data += 2;
1575 int mod, regop, rm; 1595 int mod, regop, rm;
1576 get_modrm(*data, &mod, &regop, &rm); 1596 get_modrm(*data, &mod, &regop, &rm);
1577 int8_t imm8 = static_cast<int8_t>(data[1]); 1597 int8_t imm8 = static_cast<int8_t>(data[1]);
1578 AppendToBuffer("shufps %s,%s,%d", 1598 AppendToBuffer("shufps %s,%s,%d",
1579 NameOfXMMRegister(rm), 1599 NameOfXMMRegister(rm),
1580 NameOfXMMRegister(regop), 1600 NameOfXMMRegister(regop),
1581 static_cast<int>(imm8)); 1601 static_cast<int>(imm8));
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2421 fprintf(f, " "); 2441 fprintf(f, " ");
2422 } 2442 }
2423 fprintf(f, " %s\n", buffer.start()); 2443 fprintf(f, " %s\n", buffer.start());
2424 } 2444 }
2425 } 2445 }
2426 2446
2427 2447
2428 } // namespace disasm 2448 } // namespace disasm
2429 2449
2430 #endif // V8_TARGET_ARCH_IA32 2450 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« 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