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

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

Issue 2870253003: [ia32] Add rcpps, rsqrtps, cvtdq2ps, cvttps2dq (Closed)
Patch Set: Created 3 years, 7 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 case 0x58: 861 case 0x58:
862 AppendToBuffer("vaddss %s,%s,", NameOfXMMRegister(regop), 862 AppendToBuffer("vaddss %s,%s,", NameOfXMMRegister(regop),
863 NameOfXMMRegister(vvvv)); 863 NameOfXMMRegister(vvvv));
864 current += PrintRightXMMOperand(current); 864 current += PrintRightXMMOperand(current);
865 break; 865 break;
866 case 0x59: 866 case 0x59:
867 AppendToBuffer("vmulss %s,%s,", NameOfXMMRegister(regop), 867 AppendToBuffer("vmulss %s,%s,", NameOfXMMRegister(regop),
868 NameOfXMMRegister(vvvv)); 868 NameOfXMMRegister(vvvv));
869 current += PrintRightXMMOperand(current); 869 current += PrintRightXMMOperand(current);
870 break; 870 break;
871 case 0x5b:
872 AppendToBuffer("vcvttps2dq %s,", NameOfXMMRegister(regop));
873 current += PrintRightXMMOperand(current);
874 break;
871 case 0x5c: 875 case 0x5c:
872 AppendToBuffer("vsubss %s,%s,", NameOfXMMRegister(regop), 876 AppendToBuffer("vsubss %s,%s,", NameOfXMMRegister(regop),
873 NameOfXMMRegister(vvvv)); 877 NameOfXMMRegister(vvvv));
874 current += PrintRightXMMOperand(current); 878 current += PrintRightXMMOperand(current);
875 break; 879 break;
876 case 0x5d: 880 case 0x5d:
877 AppendToBuffer("vminss %s,%s,", NameOfXMMRegister(regop), 881 AppendToBuffer("vminss %s,%s,", NameOfXMMRegister(regop),
878 NameOfXMMRegister(vvvv)); 882 NameOfXMMRegister(vvvv));
879 current += PrintRightXMMOperand(current); 883 current += PrintRightXMMOperand(current);
880 break; 884 break;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 AppendToBuffer(",%d", *current & 0x1f); 985 AppendToBuffer(",%d", *current & 0x1f);
982 current += 1; 986 current += 1;
983 break; 987 break;
984 default: 988 default:
985 UnimplementedInstruction(); 989 UnimplementedInstruction();
986 } 990 }
987 } else if (vex_none() && vex_0f()) { 991 } else if (vex_none() && vex_0f()) {
988 int mod, regop, rm, vvvv = vex_vreg(); 992 int mod, regop, rm, vvvv = vex_vreg();
989 get_modrm(*current, &mod, &regop, &rm); 993 get_modrm(*current, &mod, &regop, &rm);
990 switch (opcode) { 994 switch (opcode) {
995 case 0x52:
996 AppendToBuffer("vrsqrtps %s,", NameOfXMMRegister(regop));
997 current += PrintRightXMMOperand(current);
998 break;
999 case 0x53:
1000 AppendToBuffer("vrcpps %s,", NameOfXMMRegister(regop));
1001 current += PrintRightXMMOperand(current);
1002 break;
991 case 0x54: 1003 case 0x54:
992 AppendToBuffer("vandps %s,%s,", NameOfXMMRegister(regop), 1004 AppendToBuffer("vandps %s,%s,", NameOfXMMRegister(regop),
993 NameOfXMMRegister(vvvv)); 1005 NameOfXMMRegister(vvvv));
994 current += PrintRightXMMOperand(current); 1006 current += PrintRightXMMOperand(current);
995 break; 1007 break;
996 case 0x57: 1008 case 0x57:
997 AppendToBuffer("vxorps %s,%s,", NameOfXMMRegister(regop), 1009 AppendToBuffer("vxorps %s,%s,", NameOfXMMRegister(regop),
998 NameOfXMMRegister(vvvv)); 1010 NameOfXMMRegister(vvvv));
999 current += PrintRightXMMOperand(current); 1011 current += PrintRightXMMOperand(current);
1000 break; 1012 break;
1001 case 0x58: 1013 case 0x58:
1002 AppendToBuffer("vaddps %s,%s,", NameOfXMMRegister(regop), 1014 AppendToBuffer("vaddps %s,%s,", NameOfXMMRegister(regop),
1003 NameOfXMMRegister(vvvv)); 1015 NameOfXMMRegister(vvvv));
1004 current += PrintRightXMMOperand(current); 1016 current += PrintRightXMMOperand(current);
1005 break; 1017 break;
1006 case 0x59: 1018 case 0x59:
1007 AppendToBuffer("vmulps %s,%s,", NameOfXMMRegister(regop), 1019 AppendToBuffer("vmulps %s,%s,", NameOfXMMRegister(regop),
1008 NameOfXMMRegister(vvvv)); 1020 NameOfXMMRegister(vvvv));
1009 current += PrintRightXMMOperand(current); 1021 current += PrintRightXMMOperand(current);
1010 break; 1022 break;
1023 case 0x5B:
1024 AppendToBuffer("vcvtdq2ps %s,", NameOfXMMRegister(regop));
1025 current += PrintRightXMMOperand(current);
1026 break;
1011 case 0x5C: 1027 case 0x5C:
1012 AppendToBuffer("vsubps %s,%s,", NameOfXMMRegister(regop), 1028 AppendToBuffer("vsubps %s,%s,", NameOfXMMRegister(regop),
1013 NameOfXMMRegister(vvvv)); 1029 NameOfXMMRegister(vvvv));
1014 current += PrintRightXMMOperand(current); 1030 current += PrintRightXMMOperand(current);
1015 break; 1031 break;
1016 case 0x5D: 1032 case 0x5D:
1017 AppendToBuffer("vminps %s,%s,", NameOfXMMRegister(regop), 1033 AppendToBuffer("vminps %s,%s,", NameOfXMMRegister(regop),
1018 NameOfXMMRegister(vvvv)); 1034 NameOfXMMRegister(vvvv));
1019 current += PrintRightXMMOperand(current); 1035 current += PrintRightXMMOperand(current);
1020 break; 1036 break;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 } else { 1556 } else {
1541 AppendToBuffer("%s,", NameOfXMMRegister(regop)); 1557 AppendToBuffer("%s,", NameOfXMMRegister(regop));
1542 data += PrintRightXMMOperand(data); 1558 data += PrintRightXMMOperand(data);
1543 } 1559 }
1544 } else if (f0byte == 0x2e) { 1560 } else if (f0byte == 0x2e) {
1545 data += 2; 1561 data += 2;
1546 int mod, regop, rm; 1562 int mod, regop, rm;
1547 get_modrm(*data, &mod, &regop, &rm); 1563 get_modrm(*data, &mod, &regop, &rm);
1548 AppendToBuffer("ucomiss %s,", NameOfXMMRegister(regop)); 1564 AppendToBuffer("ucomiss %s,", NameOfXMMRegister(regop));
1549 data += PrintRightXMMOperand(data); 1565 data += PrintRightXMMOperand(data);
1550 } else if (f0byte >= 0x53 && f0byte <= 0x5F) { 1566 } else if (f0byte >= 0x52 && f0byte <= 0x5F) {
1551 const char* const pseudo_op[] = { 1567 const char* const pseudo_op[] = {
1552 "rcpps", 1568 "rsqrtps", "rcpps", "andps", "andnps", "orps",
1553 "andps", 1569 "xorps", "addps", "mulps", "cvtps2pd", "cvtdq2ps",
1554 "andnps", 1570 "subps", "minps", "divps", "maxps",
1555 "orps",
1556 "xorps",
1557 "addps",
1558 "mulps",
1559 "cvtps2pd",
1560 "cvtdq2ps",
1561 "subps",
1562 "minps",
1563 "divps",
1564 "maxps",
1565 }; 1571 };
1566 1572
1567 data += 2; 1573 data += 2;
1568 int mod, regop, rm; 1574 int mod, regop, rm;
1569 get_modrm(*data, &mod, &regop, &rm); 1575 get_modrm(*data, &mod, &regop, &rm);
1570 AppendToBuffer("%s %s,", 1576 AppendToBuffer("%s %s,", pseudo_op[f0byte - 0x52],
1571 pseudo_op[f0byte - 0x53],
1572 NameOfXMMRegister(regop)); 1577 NameOfXMMRegister(regop));
1573 data += PrintRightXMMOperand(data); 1578 data += PrintRightXMMOperand(data);
1574 } else if (f0byte == 0x50) { 1579 } else if (f0byte == 0x50) {
1575 data += 2; 1580 data += 2;
1576 int mod, regop, rm; 1581 int mod, regop, rm;
1577 get_modrm(*data, &mod, &regop, &rm); 1582 get_modrm(*data, &mod, &regop, &rm);
1578 AppendToBuffer("movmskps %s,%s", 1583 AppendToBuffer("movmskps %s,%s",
1579 NameOfCPURegister(regop), 1584 NameOfCPURegister(regop),
1580 NameOfXMMRegister(rm)); 1585 NameOfXMMRegister(rm));
1581 data++; 1586 data++;
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 break; 2264 break;
2260 case 0x51: 2265 case 0x51:
2261 mnem = "sqrtss"; 2266 mnem = "sqrtss";
2262 break; 2267 break;
2263 case 0x58: 2268 case 0x58:
2264 mnem = "addss"; 2269 mnem = "addss";
2265 break; 2270 break;
2266 case 0x59: 2271 case 0x59:
2267 mnem = "mulss"; 2272 mnem = "mulss";
2268 break; 2273 break;
2274 case 0x5B:
2275 mnem = "cvttps2dq";
2276 break;
2269 case 0x5C: 2277 case 0x5C:
2270 mnem = "subss"; 2278 mnem = "subss";
2271 break; 2279 break;
2272 case 0x5D: 2280 case 0x5D:
2273 mnem = "minss"; 2281 mnem = "minss";
2274 break; 2282 break;
2275 case 0x5E: 2283 case 0x5E:
2276 mnem = "divss"; 2284 mnem = "divss";
2277 break; 2285 break;
2278 case 0x5F: 2286 case 0x5F:
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 fprintf(f, " "); 2449 fprintf(f, " ");
2442 } 2450 }
2443 fprintf(f, " %s\n", buffer.start()); 2451 fprintf(f, " %s\n", buffer.start());
2444 } 2452 }
2445 } 2453 }
2446 2454
2447 2455
2448 } // namespace disasm 2456 } // namespace disasm
2449 2457
2450 #endif // V8_TARGET_ARCH_IA32 2458 #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