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

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

Issue 1593313010: Revert of [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (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/assembler-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 data += 2; 1477 data += 2;
1478 AppendToBuffer("%s ", f0mnem); 1478 AppendToBuffer("%s ", f0mnem);
1479 int mod, regop, rm; 1479 int mod, regop, rm;
1480 get_modrm(*data, &mod, &regop, &rm); 1480 get_modrm(*data, &mod, &regop, &rm);
1481 data += PrintRightOperand(data); 1481 data += PrintRightOperand(data);
1482 if (f0byte == 0xAB) { 1482 if (f0byte == 0xAB) {
1483 AppendToBuffer(",%s", NameOfCPURegister(regop)); 1483 AppendToBuffer(",%s", NameOfCPURegister(regop));
1484 } else { 1484 } else {
1485 AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); 1485 AppendToBuffer(",%s,cl", NameOfCPURegister(regop));
1486 } 1486 }
1487 } else if (f0byte == 0xAE) {
1488 // ldmxcsr and stmxcsr
1489 data += 2;
1490 byte modrm = *data;
1491 int mod, regop, rm;
1492 get_modrm(modrm, &mod, &regop, &rm);
1493 regop &= 0x7; // The REX.R bit does not affect the operation.
1494 const char* mnem = NULL;
1495 switch (regop) {
1496 case 2:
1497 mnem = "ldmxcsr";
1498 break;
1499 case 3:
1500 mnem = "stmxcsr";
1501 break;
1502 default:
1503 UnimplementedInstruction();
1504 return 2;
1505 }
1506 DCHECK_NOT_NULL(mnem);
1507 AppendToBuffer("%s ", mnem);
1508 data += PrintRightOperandHelper(
1509 data, &DisassemblerIA32::NameOfCPURegister);
1510 } else if (f0byte == 0xBC) { 1487 } else if (f0byte == 0xBC) {
1511 data += 2; 1488 data += 2;
1512 int mod, regop, rm; 1489 int mod, regop, rm;
1513 get_modrm(*data, &mod, &regop, &rm); 1490 get_modrm(*data, &mod, &regop, &rm);
1514 AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop)); 1491 AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop));
1515 data += PrintRightOperand(data); 1492 data += PrintRightOperand(data);
1516 } else if (f0byte == 0xBD) { 1493 } else if (f0byte == 0xBD) {
1517 data += 2; 1494 data += 2;
1518 int mod, regop, rm; 1495 int mod, regop, rm;
1519 get_modrm(*data, &mod, &regop, &rm); 1496 get_modrm(*data, &mod, &regop, &rm);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 NameOfXMMRegister(rm)); 1623 NameOfXMMRegister(rm));
1647 data++; 1624 data++;
1648 } else if (*data == 0x2A) { 1625 } else if (*data == 0x2A) {
1649 // movntdqa 1626 // movntdqa
1650 UnimplementedInstruction(); 1627 UnimplementedInstruction();
1651 } else { 1628 } else {
1652 UnimplementedInstruction(); 1629 UnimplementedInstruction();
1653 } 1630 }
1654 } else if (*data == 0x3A) { 1631 } else if (*data == 0x3A) {
1655 data++; 1632 data++;
1656 if (*data == 0x0A) { 1633 if (*data == 0x0B) {
1657 data++; 1634 data++;
1658 int mod, regop, rm; 1635 int mod, regop, rm;
1659 get_modrm(*data, &mod, &regop, &rm); 1636 get_modrm(*data, &mod, &regop, &rm);
1660 int8_t imm8 = static_cast<int8_t>(data[1]);
1661 AppendToBuffer("roundss %s,%s,%d", NameOfXMMRegister(regop),
1662 NameOfXMMRegister(rm), static_cast<int>(imm8));
1663 data += 2;
1664 } else if (*data == 0x0B) {
1665 data++;
1666 int mod, regop, rm;
1667 get_modrm(*data, &mod, &regop, &rm);
1668 int8_t imm8 = static_cast<int8_t>(data[1]); 1637 int8_t imm8 = static_cast<int8_t>(data[1]);
1669 AppendToBuffer("roundsd %s,%s,%d", 1638 AppendToBuffer("roundsd %s,%s,%d",
1670 NameOfXMMRegister(regop), 1639 NameOfXMMRegister(regop),
1671 NameOfXMMRegister(rm), 1640 NameOfXMMRegister(rm),
1672 static_cast<int>(imm8)); 1641 static_cast<int>(imm8));
1673 data += 2; 1642 data += 2;
1674 } else if (*data == 0x16) { 1643 } else if (*data == 0x16) {
1675 data++; 1644 data++;
1676 int mod, regop, rm; 1645 int mod, regop, rm;
1677 get_modrm(*data, &mod, &rm, &regop); 1646 get_modrm(*data, &mod, &rm, &regop);
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 fprintf(f, " "); 2253 fprintf(f, " ");
2285 } 2254 }
2286 fprintf(f, " %s\n", buffer.start()); 2255 fprintf(f, " %s\n", buffer.start());
2287 } 2256 }
2288 } 2257 }
2289 2258
2290 2259
2291 } // namespace disasm 2260 } // namespace disasm
2292 2261
2293 #endif // V8_TARGET_ARCH_IA32 2262 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698