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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 } | 808 } |
809 | 809 |
810 // code emission | 810 // code emission |
811 void GrowBuffer(); | 811 void GrowBuffer(); |
812 inline void emit(uint32_t x); | 812 inline void emit(uint32_t x); |
813 inline void emit(Handle<Object> handle); | 813 inline void emit(Handle<Object> handle); |
814 inline void emit(uint32_t x, RelocInfo::Mode rmode); | 814 inline void emit(uint32_t x, RelocInfo::Mode rmode); |
815 inline void emit(const Immediate& x); | 815 inline void emit(const Immediate& x); |
816 inline void emit_w(const Immediate& x); | 816 inline void emit_w(const Immediate& x); |
817 | 817 |
| 818 // Emits a REX prefix that encodes a 64-bit operand size and |
| 819 // the top bit of both register codes. |
| 820 inline void emit_rex_64(Register reg, Register rm_reg); |
| 821 |
| 822 // Emits a REX prefix that encodes a 64-bit operand size and |
| 823 // the top bit of the destination, index, and base register codes. |
| 824 inline void emit_rex_64(Register reg, const Operand& op); |
| 825 |
818 // Emit the code-object-relative offset of the label's position | 826 // Emit the code-object-relative offset of the label's position |
819 inline void emit_code_relative_offset(Label* label); | 827 inline void emit_code_relative_offset(Label* label); |
820 | 828 |
821 // instruction generation | 829 // instruction generation |
822 void emit_arith_b(int op1, int op2, Register dst, int imm8); | 830 void emit_arith_b(int op1, int op2, Register dst, int imm8); |
823 | 831 |
824 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) | 832 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) |
825 // with a given destination expression and an immediate operand. It attempts | 833 // with a given destination expression and an immediate operand. It attempts |
826 // to use the shortest encoding possible. | 834 // to use the shortest encoding possible. |
827 // sel specifies the /n in the modrm byte (see the Intel PRM). | 835 // sel specifies the /n in the modrm byte (see the Intel PRM). |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 private: | 902 private: |
895 Assembler* assembler_; | 903 Assembler* assembler_; |
896 #ifdef DEBUG | 904 #ifdef DEBUG |
897 int space_before_; | 905 int space_before_; |
898 #endif | 906 #endif |
899 }; | 907 }; |
900 | 908 |
901 } } // namespace v8::internal | 909 } } // namespace v8::internal |
902 | 910 |
903 #endif // V8_X64_ASSEMBLER_X64_H_ | 911 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |