| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 | 466 |
| 467 | 467 |
| 468 void Assembler::immediate_arithmetic_op_32(byte subcode, | 468 void Assembler::immediate_arithmetic_op_32(byte subcode, |
| 469 Register dst, | 469 Register dst, |
| 470 Immediate src) { | 470 Immediate src) { |
| 471 EnsureSpace ensure_space(this); | 471 EnsureSpace ensure_space(this); |
| 472 last_pc_ = pc_; | 472 last_pc_ = pc_; |
| 473 emit_optional_rex_32(dst); | 473 emit_optional_rex_32(dst); |
| 474 if (is_int8(src.value_)) { |
| 474 emit(0x83); | 475 emit(0x83); |
| 475 if (is_int8(src.value_)) { | |
| 476 emit_modrm(subcode, dst); | 476 emit_modrm(subcode, dst); |
| 477 emit(src.value_); | 477 emit(src.value_); |
| 478 } else if (dst.is(rax)) { | 478 } else if (dst.is(rax)) { |
| 479 emit(0x05 | (subcode << 3)); | 479 emit(0x05 | (subcode << 3)); |
| 480 emitl(src.value_); | 480 emitl(src.value_); |
| 481 } else { | 481 } else { |
| 482 emit(0x81); | 482 emit(0x81); |
| 483 emit_modrm(subcode, dst); | 483 emit_modrm(subcode, dst); |
| 484 emitl(src.value_); | 484 emitl(src.value_); |
| 485 } | 485 } |
| (...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 EnsureSpace ensure_space(this); | 1554 EnsureSpace ensure_space(this); |
| 1555 last_pc_ = pc_; | 1555 last_pc_ = pc_; |
| 1556 emit(0xD9); | 1556 emit(0xD9); |
| 1557 emit(0xEE); | 1557 emit(0xEE); |
| 1558 } | 1558 } |
| 1559 | 1559 |
| 1560 | 1560 |
| 1561 void Assembler::fld_s(const Operand& adr) { | 1561 void Assembler::fld_s(const Operand& adr) { |
| 1562 EnsureSpace ensure_space(this); | 1562 EnsureSpace ensure_space(this); |
| 1563 last_pc_ = pc_; | 1563 last_pc_ = pc_; |
| 1564 emit_optional_rex_32(adr); |
| 1564 emit(0xD9); | 1565 emit(0xD9); |
| 1565 emit_operand(0, adr); | 1566 emit_operand(0, adr); |
| 1566 } | 1567 } |
| 1567 | 1568 |
| 1568 | 1569 |
| 1569 void Assembler::fld_d(const Operand& adr) { | 1570 void Assembler::fld_d(const Operand& adr) { |
| 1570 EnsureSpace ensure_space(this); | 1571 EnsureSpace ensure_space(this); |
| 1571 last_pc_ = pc_; | 1572 last_pc_ = pc_; |
| 1573 emit_optional_rex_32(adr); |
| 1572 emit(0xDD); | 1574 emit(0xDD); |
| 1573 emit_operand(0, adr); | 1575 emit_operand(0, adr); |
| 1574 } | 1576 } |
| 1575 | 1577 |
| 1576 | 1578 |
| 1577 void Assembler::fstp_s(const Operand& adr) { | 1579 void Assembler::fstp_s(const Operand& adr) { |
| 1578 EnsureSpace ensure_space(this); | 1580 EnsureSpace ensure_space(this); |
| 1579 last_pc_ = pc_; | 1581 last_pc_ = pc_; |
| 1582 emit_optional_rex_32(adr); |
| 1580 emit(0xD9); | 1583 emit(0xD9); |
| 1581 emit_operand(3, adr); | 1584 emit_operand(3, adr); |
| 1582 } | 1585 } |
| 1583 | 1586 |
| 1584 | 1587 |
| 1585 void Assembler::fstp_d(const Operand& adr) { | 1588 void Assembler::fstp_d(const Operand& adr) { |
| 1586 EnsureSpace ensure_space(this); | 1589 EnsureSpace ensure_space(this); |
| 1587 last_pc_ = pc_; | 1590 last_pc_ = pc_; |
| 1591 emit_optional_rex_32(adr); |
| 1588 emit(0xDD); | 1592 emit(0xDD); |
| 1589 emit_operand(3, adr); | 1593 emit_operand(3, adr); |
| 1590 } | 1594 } |
| 1591 | 1595 |
| 1592 | 1596 |
| 1593 void Assembler::fild_s(const Operand& adr) { | 1597 void Assembler::fild_s(const Operand& adr) { |
| 1594 EnsureSpace ensure_space(this); | 1598 EnsureSpace ensure_space(this); |
| 1595 last_pc_ = pc_; | 1599 last_pc_ = pc_; |
| 1600 emit_optional_rex_32(adr); |
| 1596 emit(0xDB); | 1601 emit(0xDB); |
| 1597 emit_operand(0, adr); | 1602 emit_operand(0, adr); |
| 1598 } | 1603 } |
| 1599 | 1604 |
| 1600 | 1605 |
| 1601 void Assembler::fild_d(const Operand& adr) { | 1606 void Assembler::fild_d(const Operand& adr) { |
| 1602 EnsureSpace ensure_space(this); | 1607 EnsureSpace ensure_space(this); |
| 1603 last_pc_ = pc_; | 1608 last_pc_ = pc_; |
| 1609 emit_optional_rex_32(adr); |
| 1604 emit(0xDF); | 1610 emit(0xDF); |
| 1605 emit_operand(5, adr); | 1611 emit_operand(5, adr); |
| 1606 } | 1612 } |
| 1607 | 1613 |
| 1608 | 1614 |
| 1609 void Assembler::fistp_s(const Operand& adr) { | 1615 void Assembler::fistp_s(const Operand& adr) { |
| 1610 EnsureSpace ensure_space(this); | 1616 EnsureSpace ensure_space(this); |
| 1611 last_pc_ = pc_; | 1617 last_pc_ = pc_; |
| 1618 emit_optional_rex_32(adr); |
| 1612 emit(0xDB); | 1619 emit(0xDB); |
| 1613 emit_operand(3, adr); | 1620 emit_operand(3, adr); |
| 1614 } | 1621 } |
| 1615 | 1622 |
| 1616 | 1623 |
| 1617 void Assembler::fisttp_s(const Operand& adr) { | 1624 void Assembler::fisttp_s(const Operand& adr) { |
| 1618 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE3)); | 1625 ASSERT(CpuFeatures::IsEnabled(CpuFeatures::SSE3)); |
| 1619 EnsureSpace ensure_space(this); | 1626 EnsureSpace ensure_space(this); |
| 1620 last_pc_ = pc_; | 1627 last_pc_ = pc_; |
| 1628 emit_optional_rex_32(adr); |
| 1621 emit(0xDB); | 1629 emit(0xDB); |
| 1622 emit_operand(1, adr); | 1630 emit_operand(1, adr); |
| 1623 } | 1631 } |
| 1624 | 1632 |
| 1625 | 1633 |
| 1626 void Assembler::fist_s(const Operand& adr) { | 1634 void Assembler::fist_s(const Operand& adr) { |
| 1627 EnsureSpace ensure_space(this); | 1635 EnsureSpace ensure_space(this); |
| 1628 last_pc_ = pc_; | 1636 last_pc_ = pc_; |
| 1637 emit_optional_rex_32(adr); |
| 1629 emit(0xDB); | 1638 emit(0xDB); |
| 1630 emit_operand(2, adr); | 1639 emit_operand(2, adr); |
| 1631 } | 1640 } |
| 1632 | 1641 |
| 1633 | 1642 |
| 1634 void Assembler::fistp_d(const Operand& adr) { | 1643 void Assembler::fistp_d(const Operand& adr) { |
| 1635 EnsureSpace ensure_space(this); | 1644 EnsureSpace ensure_space(this); |
| 1636 last_pc_ = pc_; | 1645 last_pc_ = pc_; |
| 1646 emit_optional_rex_32(adr); |
| 1637 emit(0xDF); | 1647 emit(0xDF); |
| 1638 emit_operand(8, adr); | 1648 emit_operand(8, adr); |
| 1639 } | 1649 } |
| 1640 | 1650 |
| 1641 | 1651 |
| 1642 void Assembler::fabs() { | 1652 void Assembler::fabs() { |
| 1643 EnsureSpace ensure_space(this); | 1653 EnsureSpace ensure_space(this); |
| 1644 last_pc_ = pc_; | 1654 last_pc_ = pc_; |
| 1645 emit(0xD9); | 1655 emit(0xD9); |
| 1646 emit(0xE1); | 1656 emit(0xE1); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 void Assembler::fsub(int i) { | 1691 void Assembler::fsub(int i) { |
| 1682 EnsureSpace ensure_space(this); | 1692 EnsureSpace ensure_space(this); |
| 1683 last_pc_ = pc_; | 1693 last_pc_ = pc_; |
| 1684 emit_farith(0xDC, 0xE8, i); | 1694 emit_farith(0xDC, 0xE8, i); |
| 1685 } | 1695 } |
| 1686 | 1696 |
| 1687 | 1697 |
| 1688 void Assembler::fisub_s(const Operand& adr) { | 1698 void Assembler::fisub_s(const Operand& adr) { |
| 1689 EnsureSpace ensure_space(this); | 1699 EnsureSpace ensure_space(this); |
| 1690 last_pc_ = pc_; | 1700 last_pc_ = pc_; |
| 1701 emit_optional_rex_32(adr); |
| 1691 emit(0xDA); | 1702 emit(0xDA); |
| 1692 emit_operand(4, adr); | 1703 emit_operand(4, adr); |
| 1693 } | 1704 } |
| 1694 | 1705 |
| 1695 | 1706 |
| 1696 void Assembler::fmul(int i) { | 1707 void Assembler::fmul(int i) { |
| 1697 EnsureSpace ensure_space(this); | 1708 EnsureSpace ensure_space(this); |
| 1698 last_pc_ = pc_; | 1709 last_pc_ = pc_; |
| 1699 emit_farith(0xDC, 0xC8, i); | 1710 emit_farith(0xDC, 0xC8, i); |
| 1700 } | 1711 } |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 bool BreakLocationIterator::IsDebugBreakAtReturn() { | 2135 bool BreakLocationIterator::IsDebugBreakAtReturn() { |
| 2125 UNIMPLEMENTED(); | 2136 UNIMPLEMENTED(); |
| 2126 return false; | 2137 return false; |
| 2127 } | 2138 } |
| 2128 | 2139 |
| 2129 void BreakLocationIterator::SetDebugBreakAtReturn() { | 2140 void BreakLocationIterator::SetDebugBreakAtReturn() { |
| 2130 UNIMPLEMENTED(); | 2141 UNIMPLEMENTED(); |
| 2131 } | 2142 } |
| 2132 | 2143 |
| 2133 } } // namespace v8::internal | 2144 } } // namespace v8::internal |
| OLD | NEW |