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

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

Issue 1614973002: Added roundss to the disassembler of x64 and ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/disasm-ia32.cc ('k') | no next file » | 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_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 current += PrintRightOperand(current); 949 current += PrintRightOperand(current);
950 AppendToBuffer(",%s", NameOfCPURegister(vvvv)); 950 AppendToBuffer(",%s", NameOfCPURegister(vvvv));
951 break; 951 break;
952 default: 952 default:
953 UnimplementedInstruction(); 953 UnimplementedInstruction();
954 } 954 }
955 } else if (vex_66() && vex_0f3a()) { 955 } else if (vex_66() && vex_0f3a()) {
956 int mod, regop, rm, vvvv = vex_vreg(); 956 int mod, regop, rm, vvvv = vex_vreg();
957 get_modrm(*current, &mod, &regop, &rm); 957 get_modrm(*current, &mod, &regop, &rm);
958 switch (opcode) { 958 switch (opcode) {
959 case 0x0a:
960 AppendToBuffer("vroundss %s,%s,", NameOfXMMRegister(regop),
961 NameOfXMMRegister(vvvv));
962 current += PrintRightXMMOperand(current);
963 AppendToBuffer(",0x%x", *current++);
964 break;
959 case 0x0b: 965 case 0x0b:
960 AppendToBuffer("vroundsd %s,%s,", NameOfXMMRegister(regop), 966 AppendToBuffer("vroundsd %s,%s,", NameOfXMMRegister(regop),
961 NameOfXMMRegister(vvvv)); 967 NameOfXMMRegister(vvvv));
962 current += PrintRightXMMOperand(current); 968 current += PrintRightXMMOperand(current);
963 AppendToBuffer(",0x%x", *current++); 969 AppendToBuffer(",0x%x", *current++);
964 break; 970 break;
965 default: 971 default:
966 UnimplementedInstruction(); 972 UnimplementedInstruction();
967 } 973 }
968 } else if (vex_f3() && vex_0f()) { 974 } else if (vex_f3() && vex_0f()) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 int mod, regop, rm; 1515 int mod, regop, rm;
1510 if (opcode == 0x3A) { 1516 if (opcode == 0x3A) {
1511 byte third_byte = *current; 1517 byte third_byte = *current;
1512 current = data + 3; 1518 current = data + 3;
1513 if (third_byte == 0x17) { 1519 if (third_byte == 0x17) {
1514 get_modrm(*current, &mod, &regop, &rm); 1520 get_modrm(*current, &mod, &regop, &rm);
1515 AppendToBuffer("extractps "); // reg/m32, xmm, imm8 1521 AppendToBuffer("extractps "); // reg/m32, xmm, imm8
1516 current += PrintRightOperand(current); 1522 current += PrintRightOperand(current);
1517 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3); 1523 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3);
1518 current += 1; 1524 current += 1;
1525 } else if (third_byte == 0x0a) {
1526 get_modrm(*current, &mod, &regop, &rm);
1527 AppendToBuffer("roundss %s,", NameOfXMMRegister(regop));
1528 current += PrintRightXMMOperand(current);
1529 AppendToBuffer(",0x%x", (*current) & 3);
1530 current += 1;
1519 } else if (third_byte == 0x0b) { 1531 } else if (third_byte == 0x0b) {
1520 get_modrm(*current, &mod, &regop, &rm); 1532 get_modrm(*current, &mod, &regop, &rm);
1521 // roundsd xmm, xmm/m64, imm8 1533 // roundsd xmm, xmm/m64, imm8
1522 AppendToBuffer("roundsd %s,", NameOfXMMRegister(regop)); 1534 AppendToBuffer("roundsd %s,", NameOfXMMRegister(regop));
1523 current += PrintRightXMMOperand(current); 1535 current += PrintRightXMMOperand(current);
1524 AppendToBuffer(",0x%x", (*current) & 3); 1536 AppendToBuffer(",0x%x", (*current) & 3);
1525 current += 1; 1537 current += 1;
1526 } else if (third_byte == 0x16) { 1538 } else if (third_byte == 0x16) {
1527 get_modrm(*current, &mod, &rm, &regop); 1539 get_modrm(*current, &mod, &rm, &regop);
1528 AppendToBuffer("pextrd "); // reg/m32, xmm, imm8 1540 AppendToBuffer("pextrd "); // reg/m32, xmm, imm8
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { 2502 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) {
2491 fprintf(f, " "); 2503 fprintf(f, " ");
2492 } 2504 }
2493 fprintf(f, " %s\n", buffer.start()); 2505 fprintf(f, " %s\n", buffer.start());
2494 } 2506 }
2495 } 2507 }
2496 2508
2497 } // namespace disasm 2509 } // namespace disasm
2498 2510
2499 #endif // V8_TARGET_ARCH_X64 2511 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698