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

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

Issue 1420653005: [x64] Implemennt vroundsd AVX instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('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_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 break; 945 break;
946 case 0xf7: 946 case 0xf7:
947 AppendToBuffer("shlx%c %s,", operand_size_code(), 947 AppendToBuffer("shlx%c %s,", operand_size_code(),
948 NameOfCPURegister(regop)); 948 NameOfCPURegister(regop));
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()) {
956 int mod, regop, rm, vvvv = vex_vreg();
957 get_modrm(*current, &mod, &regop, &rm);
958 switch (opcode) {
959 case 0x0b:
960 AppendToBuffer("vroundsd %s,%s,", NameOfXMMRegister(regop),
961 NameOfXMMRegister(vvvv));
962 current += PrintRightXMMOperand(current);
963 AppendToBuffer(",0x%x", *current++);
964 break;
965 default:
966 UnimplementedInstruction();
967 }
955 } else if (vex_f3() && vex_0f()) { 968 } else if (vex_f3() && vex_0f()) {
956 int mod, regop, rm, vvvv = vex_vreg(); 969 int mod, regop, rm, vvvv = vex_vreg();
957 get_modrm(*current, &mod, &regop, &rm); 970 get_modrm(*current, &mod, &regop, &rm);
958 switch (opcode) { 971 switch (opcode) {
959 case 0x10: 972 case 0x10:
960 AppendToBuffer("vmovss %s,", NameOfXMMRegister(regop)); 973 AppendToBuffer("vmovss %s,", NameOfXMMRegister(regop));
961 if (mod == 3) { 974 if (mod == 3) {
962 AppendToBuffer("%s,", NameOfXMMRegister(vvvv)); 975 AppendToBuffer("%s,", NameOfXMMRegister(vvvv));
963 } 976 }
964 current += PrintRightXMMOperand(current); 977 current += PrintRightXMMOperand(current);
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 get_modrm(*current, &mod, &regop, &rm); 1499 get_modrm(*current, &mod, &regop, &rm);
1487 AppendToBuffer("extractps "); // reg/m32, xmm, imm8 1500 AppendToBuffer("extractps "); // reg/m32, xmm, imm8
1488 current += PrintRightOperand(current); 1501 current += PrintRightOperand(current);
1489 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3); 1502 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3);
1490 current += 1; 1503 current += 1;
1491 } else if (third_byte == 0x0b) { 1504 } else if (third_byte == 0x0b) {
1492 get_modrm(*current, &mod, &regop, &rm); 1505 get_modrm(*current, &mod, &regop, &rm);
1493 // roundsd xmm, xmm/m64, imm8 1506 // roundsd xmm, xmm/m64, imm8
1494 AppendToBuffer("roundsd %s,", NameOfXMMRegister(regop)); 1507 AppendToBuffer("roundsd %s,", NameOfXMMRegister(regop));
1495 current += PrintRightXMMOperand(current); 1508 current += PrintRightXMMOperand(current);
1496 AppendToBuffer(",%d", (*current) & 3); 1509 AppendToBuffer(",0x%x", (*current) & 3);
1497 current += 1; 1510 current += 1;
1498 } else if (third_byte == 0x16) { 1511 } else if (third_byte == 0x16) {
1499 get_modrm(*current, &mod, &rm, &regop); 1512 get_modrm(*current, &mod, &rm, &regop);
1500 AppendToBuffer("pextrd "); // reg/m32, xmm, imm8 1513 AppendToBuffer("pextrd "); // reg/m32, xmm, imm8
1501 current += PrintRightOperand(current); 1514 current += PrintRightOperand(current);
1502 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3); 1515 AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3);
1503 current += 1; 1516 current += 1;
1504 } else if (third_byte == 0x22) { 1517 } else if (third_byte == 0x22) {
1505 get_modrm(*current, &mod, &regop, &rm); 1518 get_modrm(*current, &mod, &regop, &rm);
1506 AppendToBuffer("pinsrd "); // xmm, reg/m32, imm8 1519 AppendToBuffer("pinsrd "); // xmm, reg/m32, imm8
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { 2472 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) {
2460 fprintf(f, " "); 2473 fprintf(f, " ");
2461 } 2474 }
2462 fprintf(f, " %s\n", buffer.start()); 2475 fprintf(f, " %s\n", buffer.start());
2463 } 2476 }
2464 } 2477 }
2465 2478
2466 } // namespace disasm 2479 } // namespace disasm
2467 2480
2468 #endif // V8_TARGET_ARCH_X64 2481 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698