| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 381 |
| 382 | 382 |
| 383 void Assembler::mov_b(Register dst, const Operand& src) { | 383 void Assembler::mov_b(Register dst, const Operand& src) { |
| 384 CHECK(dst.is_byte_register()); | 384 CHECK(dst.is_byte_register()); |
| 385 EnsureSpace ensure_space(this); | 385 EnsureSpace ensure_space(this); |
| 386 EMIT(0x8A); | 386 EMIT(0x8A); |
| 387 emit_operand(dst, src); | 387 emit_operand(dst, src); |
| 388 } | 388 } |
| 389 | 389 |
| 390 | 390 |
| 391 void Assembler::mov_b(const Operand& dst, const Immediate& src) { |
| 392 EnsureSpace ensure_space(this); |
| 393 EMIT(0xC6); |
| 394 emit_operand(eax, dst); |
| 395 EMIT(static_cast<int8_t>(src.x_)); |
| 396 } |
| 397 |
| 398 |
| 391 void Assembler::mov_b(const Operand& dst, int8_t imm8) { | 399 void Assembler::mov_b(const Operand& dst, int8_t imm8) { |
| 392 EnsureSpace ensure_space(this); | 400 EnsureSpace ensure_space(this); |
| 393 EMIT(0xC6); | 401 EMIT(0xC6); |
| 394 emit_operand(eax, dst); | 402 emit_operand(eax, dst); |
| 395 EMIT(imm8); | 403 EMIT(imm8); |
| 396 } | 404 } |
| 397 | 405 |
| 398 | 406 |
| 399 void Assembler::mov_b(const Operand& dst, Register src) { | 407 void Assembler::mov_b(const Operand& dst, Register src) { |
| 400 CHECK(src.is_byte_register()); | 408 CHECK(src.is_byte_register()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 423 void Assembler::mov_w(const Operand& dst, int16_t imm16) { | 431 void Assembler::mov_w(const Operand& dst, int16_t imm16) { |
| 424 EnsureSpace ensure_space(this); | 432 EnsureSpace ensure_space(this); |
| 425 EMIT(0x66); | 433 EMIT(0x66); |
| 426 EMIT(0xC7); | 434 EMIT(0xC7); |
| 427 emit_operand(eax, dst); | 435 emit_operand(eax, dst); |
| 428 EMIT(static_cast<int8_t>(imm16 & 0xff)); | 436 EMIT(static_cast<int8_t>(imm16 & 0xff)); |
| 429 EMIT(static_cast<int8_t>(imm16 >> 8)); | 437 EMIT(static_cast<int8_t>(imm16 >> 8)); |
| 430 } | 438 } |
| 431 | 439 |
| 432 | 440 |
| 441 void Assembler::mov_w(const Operand& dst, const Immediate& src) { |
| 442 EnsureSpace ensure_space(this); |
| 443 EMIT(0x66); |
| 444 EMIT(0xC7); |
| 445 emit_operand(eax, dst); |
| 446 EMIT(static_cast<int8_t>(src.x_ & 0xff)); |
| 447 EMIT(static_cast<int8_t>(src.x_ >> 8)); |
| 448 } |
| 449 |
| 450 |
| 433 void Assembler::mov(Register dst, int32_t imm32) { | 451 void Assembler::mov(Register dst, int32_t imm32) { |
| 434 EnsureSpace ensure_space(this); | 452 EnsureSpace ensure_space(this); |
| 435 EMIT(0xB8 | dst.code()); | 453 EMIT(0xB8 | dst.code()); |
| 436 emit(imm32); | 454 emit(imm32); |
| 437 } | 455 } |
| 438 | 456 |
| 439 | 457 |
| 440 void Assembler::mov(Register dst, const Immediate& x) { | 458 void Assembler::mov(Register dst, const Immediate& x) { |
| 441 EnsureSpace ensure_space(this); | 459 EnsureSpace ensure_space(this); |
| 442 EMIT(0xB8 | dst.code()); | 460 EMIT(0xB8 | dst.code()); |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 emit_farith(0xDC, 0xE8, i); | 1709 emit_farith(0xDC, 0xE8, i); |
| 1692 } | 1710 } |
| 1693 | 1711 |
| 1694 | 1712 |
| 1695 void Assembler::fsub_i(int i) { | 1713 void Assembler::fsub_i(int i) { |
| 1696 EnsureSpace ensure_space(this); | 1714 EnsureSpace ensure_space(this); |
| 1697 emit_farith(0xD8, 0xE0, i); | 1715 emit_farith(0xD8, 0xE0, i); |
| 1698 } | 1716 } |
| 1699 | 1717 |
| 1700 | 1718 |
| 1719 void Assembler::fsubr_d(const Operand& adr) { |
| 1720 EnsureSpace ensure_space(this); |
| 1721 EMIT(0xDC); |
| 1722 emit_operand(ebp, adr); |
| 1723 } |
| 1724 |
| 1725 |
| 1726 void Assembler::fsub_d(const Operand& adr) { |
| 1727 EnsureSpace ensure_space(this); |
| 1728 EMIT(0xDC); |
| 1729 emit_operand(esp, adr); |
| 1730 } |
| 1731 |
| 1732 |
| 1701 void Assembler::fisub_s(const Operand& adr) { | 1733 void Assembler::fisub_s(const Operand& adr) { |
| 1702 EnsureSpace ensure_space(this); | 1734 EnsureSpace ensure_space(this); |
| 1703 EMIT(0xDA); | 1735 EMIT(0xDA); |
| 1704 emit_operand(esp, adr); | 1736 emit_operand(esp, adr); |
| 1705 } | 1737 } |
| 1706 | 1738 |
| 1707 | 1739 |
| 1708 void Assembler::fmul_i(int i) { | 1740 void Assembler::fmul_i(int i) { |
| 1709 EnsureSpace ensure_space(this); | 1741 EnsureSpace ensure_space(this); |
| 1710 emit_farith(0xD8, 0xC8, i); | 1742 emit_farith(0xD8, 0xC8, i); |
| 1711 } | 1743 } |
| 1712 | 1744 |
| 1713 | 1745 |
| 1714 void Assembler::fmul(int i) { | 1746 void Assembler::fmul(int i) { |
| 1715 EnsureSpace ensure_space(this); | 1747 EnsureSpace ensure_space(this); |
| 1716 emit_farith(0xDC, 0xC8, i); | 1748 emit_farith(0xDC, 0xC8, i); |
| 1717 } | 1749 } |
| 1718 | 1750 |
| 1719 | 1751 |
| 1752 void Assembler::fmul_d(const Operand& adr) { |
| 1753 EnsureSpace ensure_space(this); |
| 1754 EMIT(0xDC); |
| 1755 emit_operand(ecx, adr); |
| 1756 } |
| 1757 |
| 1758 |
| 1720 void Assembler::fdiv(int i) { | 1759 void Assembler::fdiv(int i) { |
| 1721 EnsureSpace ensure_space(this); | 1760 EnsureSpace ensure_space(this); |
| 1722 emit_farith(0xDC, 0xF8, i); | 1761 emit_farith(0xDC, 0xF8, i); |
| 1723 } | 1762 } |
| 1724 | 1763 |
| 1725 | 1764 |
| 1765 void Assembler::fdiv_d(const Operand& adr) { |
| 1766 EnsureSpace ensure_space(this); |
| 1767 EMIT(0xDC); |
| 1768 emit_operand(esi, adr); |
| 1769 } |
| 1770 |
| 1771 |
| 1772 void Assembler::fdivr_d(const Operand& adr) { |
| 1773 EnsureSpace ensure_space(this); |
| 1774 EMIT(0xDC); |
| 1775 emit_operand(edi, adr); |
| 1776 } |
| 1777 |
| 1778 |
| 1726 void Assembler::fdiv_i(int i) { | 1779 void Assembler::fdiv_i(int i) { |
| 1727 EnsureSpace ensure_space(this); | 1780 EnsureSpace ensure_space(this); |
| 1728 emit_farith(0xD8, 0xF0, i); | 1781 emit_farith(0xD8, 0xF0, i); |
| 1729 } | 1782 } |
| 1730 | 1783 |
| 1731 | 1784 |
| 1732 void Assembler::faddp(int i) { | 1785 void Assembler::faddp(int i) { |
| 1733 EnsureSpace ensure_space(this); | 1786 EnsureSpace ensure_space(this); |
| 1734 emit_farith(0xDE, 0xC0, i); | 1787 emit_farith(0xDE, 0xC0, i); |
| 1735 } | 1788 } |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 fflush(coverage_log); | 2128 fflush(coverage_log); |
| 2076 } | 2129 } |
| 2077 } | 2130 } |
| 2078 | 2131 |
| 2079 #endif | 2132 #endif |
| 2080 | 2133 |
| 2081 } // namespace internal | 2134 } // namespace internal |
| 2082 } // namespace v8 | 2135 } // namespace v8 |
| 2083 | 2136 |
| 2084 #endif // V8_TARGET_ARCH_X87 | 2137 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |