| 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 // Note: The same Label can be used for forward and backward branches | 776 // Note: The same Label can be used for forward and backward branches |
| 777 // but it may be bound only once. | 777 // but it may be bound only once. |
| 778 | 778 |
| 779 void bind(Label* L); // binds an unbound label L to the current code position | 779 void bind(Label* L); // binds an unbound label L to the current code position |
| 780 void bind(NearLabel* L); | 780 void bind(NearLabel* L); |
| 781 | 781 |
| 782 // Calls | 782 // Calls |
| 783 void call(Label* L); | 783 void call(Label* L); |
| 784 void call(byte* entry, RelocInfo::Mode rmode); | 784 void call(byte* entry, RelocInfo::Mode rmode); |
| 785 void call(const Operand& adr); | 785 void call(const Operand& adr); |
| 786 void call(Handle<Code> code, RelocInfo::Mode rmode); | 786 void call(Handle<Code> code, RelocInfo::Mode rmode, AstId id = kNoAstId); |
| 787 | 787 |
| 788 // Jumps | 788 // Jumps |
| 789 void jmp(Label* L); // unconditional jump to L | 789 void jmp(Label* L); // unconditional jump to L |
| 790 void jmp(byte* entry, RelocInfo::Mode rmode); | 790 void jmp(byte* entry, RelocInfo::Mode rmode); |
| 791 void jmp(const Operand& adr); | 791 void jmp(const Operand& adr); |
| 792 void jmp(Handle<Code> code, RelocInfo::Mode rmode); | 792 void jmp(Handle<Code> code, RelocInfo::Mode rmode); |
| 793 | 793 |
| 794 // Short jump | 794 // Short jump |
| 795 void jmp(NearLabel* L); | 795 void jmp(NearLabel* L); |
| 796 | 796 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 return *reinterpret_cast<uint32_t*>(addr_at(pos)); | 977 return *reinterpret_cast<uint32_t*>(addr_at(pos)); |
| 978 } | 978 } |
| 979 void long_at_put(int pos, uint32_t x) { | 979 void long_at_put(int pos, uint32_t x) { |
| 980 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; | 980 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; |
| 981 } | 981 } |
| 982 | 982 |
| 983 // code emission | 983 // code emission |
| 984 void GrowBuffer(); | 984 void GrowBuffer(); |
| 985 inline void emit(uint32_t x); | 985 inline void emit(uint32_t x); |
| 986 inline void emit(Handle<Object> handle); | 986 inline void emit(Handle<Object> handle); |
| 987 inline void emit(uint32_t x, RelocInfo::Mode rmode); | 987 inline void emit(uint32_t x, RelocInfo::Mode rmode, AstId id = kNoAstId); |
| 988 inline void emit(const Immediate& x); | 988 inline void emit(const Immediate& x); |
| 989 inline void emit_w(const Immediate& x); | 989 inline void emit_w(const Immediate& x); |
| 990 | 990 |
| 991 // Emit the code-object-relative offset of the label's position | 991 // Emit the code-object-relative offset of the label's position |
| 992 inline void emit_code_relative_offset(Label* label); | 992 inline void emit_code_relative_offset(Label* label); |
| 993 | 993 |
| 994 // instruction generation | 994 // instruction generation |
| 995 void emit_arith_b(int op1, int op2, Register dst, int imm8); | 995 void emit_arith_b(int op1, int op2, Register dst, int imm8); |
| 996 | 996 |
| 997 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) | 997 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 private: | 1064 private: |
| 1065 Assembler* assembler_; | 1065 Assembler* assembler_; |
| 1066 #ifdef DEBUG | 1066 #ifdef DEBUG |
| 1067 int space_before_; | 1067 int space_before_; |
| 1068 #endif | 1068 #endif |
| 1069 }; | 1069 }; |
| 1070 | 1070 |
| 1071 } } // namespace v8::internal | 1071 } } // namespace v8::internal |
| 1072 | 1072 |
| 1073 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1073 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |