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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 // Move the offset of the label location relative to the current | 716 // Move the offset of the label location relative to the current |
717 // position (after the move) to the destination. | 717 // position (after the move) to the destination. |
718 void movl(const Operand& dst, Label* src); | 718 void movl(const Operand& dst, Label* src); |
719 | 719 |
720 // Move sign extended immediate to memory location. | 720 // Move sign extended immediate to memory location. |
721 void movq(const Operand& dst, Immediate value); | 721 void movq(const Operand& dst, Immediate value); |
722 // Instructions to load a 64-bit immediate into a register. | 722 // Instructions to load a 64-bit immediate into a register. |
723 // All 64-bit immediates must have a relocation mode. | 723 // All 64-bit immediates must have a relocation mode. |
724 void movq(Register dst, void* ptr, RelocInfo::Mode rmode); | 724 void movq(Register dst, void* ptr, RelocInfo::Mode rmode); |
725 void movq(Register dst, int64_t value, RelocInfo::Mode rmode); | 725 void movq(Register dst, int64_t value, RelocInfo::Mode rmode); |
726 void movq(Register dst, const char* s, RelocInfo::Mode rmode); | |
727 // Moves the address of the external reference into the register. | 726 // Moves the address of the external reference into the register. |
728 void movq(Register dst, ExternalReference ext); | 727 void movq(Register dst, ExternalReference ext); |
729 void movq(Register dst, Handle<Object> handle, RelocInfo::Mode rmode); | 728 void movq(Register dst, Handle<Object> handle, RelocInfo::Mode rmode); |
730 | 729 |
731 void movsxbq(Register dst, const Operand& src); | 730 void movsxbq(Register dst, const Operand& src); |
732 void movsxwq(Register dst, const Operand& src); | 731 void movsxwq(Register dst, const Operand& src); |
733 void movsxlq(Register dst, Register src); | 732 void movsxlq(Register dst, Register src); |
734 void movsxlq(Register dst, const Operand& src); | 733 void movsxlq(Register dst, const Operand& src); |
735 void movzxbq(Register dst, const Operand& src); | 734 void movzxbq(Register dst, const Operand& src); |
736 void movzxbl(Register dst, const Operand& src); | 735 void movzxbl(Register dst, const Operand& src); |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 void long_at_put(int pos, uint32_t x) { | 1466 void long_at_put(int pos, uint32_t x) { |
1468 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; | 1467 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; |
1469 } | 1468 } |
1470 | 1469 |
1471 // code emission | 1470 // code emission |
1472 void GrowBuffer(); | 1471 void GrowBuffer(); |
1473 | 1472 |
1474 void emit(byte x) { *pc_++ = x; } | 1473 void emit(byte x) { *pc_++ = x; } |
1475 inline void emitl(uint32_t x); | 1474 inline void emitl(uint32_t x); |
1476 inline void emitp(void* x, RelocInfo::Mode rmode); | 1475 inline void emitp(void* x, RelocInfo::Mode rmode); |
1477 inline void emitq(uint64_t x, RelocInfo::Mode rmode); | 1476 inline void emitq(uint64_t x); |
1478 inline void emitw(uint16_t x); | 1477 inline void emitw(uint16_t x); |
1479 inline void emit_code_target(Handle<Code> target, | 1478 inline void emit_code_target(Handle<Code> target, |
1480 RelocInfo::Mode rmode, | 1479 RelocInfo::Mode rmode, |
1481 TypeFeedbackId ast_id = TypeFeedbackId::None()); | 1480 TypeFeedbackId ast_id = TypeFeedbackId::None()); |
1482 inline void emit_runtime_entry(Address entry, RelocInfo::Mode rmode); | 1481 inline void emit_runtime_entry(Address entry, RelocInfo::Mode rmode); |
1483 void emit(Immediate x) { emitl(x.value_); } | 1482 void emit(Immediate x) { emitl(x.value_); } |
1484 | 1483 |
1485 // Emits a REX prefix that encodes a 64-bit operand size and | 1484 // Emits a REX prefix that encodes a 64-bit operand size and |
1486 // the top bit of both register codes. | 1485 // the top bit of both register codes. |
1487 // High bit of reg goes to REX.R, high bit of rm_reg goes to REX.B. | 1486 // High bit of reg goes to REX.R, high bit of rm_reg goes to REX.B. |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 private: | 1680 private: |
1682 Assembler* assembler_; | 1681 Assembler* assembler_; |
1683 #ifdef DEBUG | 1682 #ifdef DEBUG |
1684 int space_before_; | 1683 int space_before_; |
1685 #endif | 1684 #endif |
1686 }; | 1685 }; |
1687 | 1686 |
1688 } } // namespace v8::internal | 1687 } } // namespace v8::internal |
1689 | 1688 |
1690 #endif // V8_X64_ASSEMBLER_X64_H_ | 1689 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |