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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 // Label L; // unbound label | 835 // Label L; // unbound label |
836 // j(cc, &L); // forward branch to unbound label | 836 // j(cc, &L); // forward branch to unbound label |
837 // bind(&L); // bind label to the current pc | 837 // bind(&L); // bind label to the current pc |
838 // j(cc, &L); // backward branch to bound label | 838 // j(cc, &L); // backward branch to bound label |
839 // bind(&L); // illegal: a label may be bound only once | 839 // bind(&L); // illegal: a label may be bound only once |
840 // | 840 // |
841 // Note: The same Label can be used for forward and backward branches | 841 // Note: The same Label can be used for forward and backward branches |
842 // but it may be bound only once. | 842 // but it may be bound only once. |
843 | 843 |
844 void bind(Label* L); // binds an unbound label L to the current code position | 844 void bind(Label* L); // binds an unbound label L to the current code position |
| 845 // DEPRECATED. Use bind(Label*) with jmp(Label*, Label::kNear) instead. |
845 void bind(NearLabel* L); | 846 void bind(NearLabel* L); |
846 | 847 |
847 // Calls | 848 // Calls |
848 void call(Label* L); | 849 void call(Label* L); |
849 void call(byte* entry, RelocInfo::Mode rmode); | 850 void call(byte* entry, RelocInfo::Mode rmode); |
850 int CallSize(const Operand& adr); | 851 int CallSize(const Operand& adr); |
851 void call(const Operand& adr); | 852 void call(const Operand& adr); |
852 int CallSize(Handle<Code> code, RelocInfo::Mode mode); | 853 int CallSize(Handle<Code> code, RelocInfo::Mode mode); |
853 void call(Handle<Code> code, | 854 void call(Handle<Code> code, |
854 RelocInfo::Mode rmode, | 855 RelocInfo::Mode rmode, |
855 unsigned ast_id = kNoASTId); | 856 unsigned ast_id = kNoASTId); |
856 | 857 |
857 // Jumps | 858 // Jumps |
858 void jmp(Label* L); // unconditional jump to L | 859 void jmp(Label* L, bool near = Label::kFar); // unconditional jump to L |
859 void jmp(byte* entry, RelocInfo::Mode rmode); | 860 void jmp(byte* entry, RelocInfo::Mode rmode); |
860 void jmp(const Operand& adr); | 861 void jmp(const Operand& adr); |
861 void jmp(Handle<Code> code, RelocInfo::Mode rmode); | 862 void jmp(Handle<Code> code, RelocInfo::Mode rmode); |
862 | 863 |
863 // Short jump | 864 // Short jump |
| 865 // DEPRECATED. Use jmp(Label*, Label::kNear) instead. |
864 void jmp(NearLabel* L); | 866 void jmp(NearLabel* L); |
865 | 867 |
866 // Conditional jumps | 868 // Conditional jumps |
867 void j(Condition cc, Label* L, Hint hint = no_hint); | 869 void j(Condition cc, Label* L, bool near = Label::kFar, Hint hint = no_hint); |
868 void j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint = no_hint); | 870 void j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint = no_hint); |
869 void j(Condition cc, Handle<Code> code, Hint hint = no_hint); | 871 void j(Condition cc, Handle<Code> code, Hint hint = no_hint); |
870 | 872 |
871 // Conditional short jump | 873 // Conditional short jump |
| 874 // DEPRECATED. Use j(Condition, Label*, Label::kNear) instead. |
872 void j(Condition cc, NearLabel* L, Hint hint = no_hint); | 875 void j(Condition cc, NearLabel* L, Hint hint = no_hint); |
873 | 876 |
874 // Floating-point operations | 877 // Floating-point operations |
875 void fld(int i); | 878 void fld(int i); |
876 void fstp(int i); | 879 void fstp(int i); |
877 | 880 |
878 void fld1(); | 881 void fld1(); |
879 void fldz(); | 882 void fldz(); |
880 void fldpi(); | 883 void fldpi(); |
881 void fldln2(); | 884 void fldln2(); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 void emit_farith(int b1, int b2, int i); | 1101 void emit_farith(int b1, int b2, int i); |
1099 | 1102 |
1100 // labels | 1103 // labels |
1101 void print(Label* L); | 1104 void print(Label* L); |
1102 void bind_to(Label* L, int pos); | 1105 void bind_to(Label* L, int pos); |
1103 | 1106 |
1104 // displacements | 1107 // displacements |
1105 inline Displacement disp_at(Label* L); | 1108 inline Displacement disp_at(Label* L); |
1106 inline void disp_at_put(Label* L, Displacement disp); | 1109 inline void disp_at_put(Label* L, Displacement disp); |
1107 inline void emit_disp(Label* L, Displacement::Type type); | 1110 inline void emit_disp(Label* L, Displacement::Type type); |
| 1111 inline void emit_near_disp(Label* L); |
1108 | 1112 |
1109 // record reloc info for current pc_ | 1113 // record reloc info for current pc_ |
1110 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1114 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
1111 | 1115 |
1112 friend class CodePatcher; | 1116 friend class CodePatcher; |
1113 friend class EnsureSpace; | 1117 friend class EnsureSpace; |
1114 | 1118 |
1115 // Code buffer: | 1119 // Code buffer: |
1116 // The buffer into which code and relocation info are generated. | 1120 // The buffer into which code and relocation info are generated. |
1117 byte* buffer_; | 1121 byte* buffer_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 private: | 1161 private: |
1158 Assembler* assembler_; | 1162 Assembler* assembler_; |
1159 #ifdef DEBUG | 1163 #ifdef DEBUG |
1160 int space_before_; | 1164 int space_before_; |
1161 #endif | 1165 #endif |
1162 }; | 1166 }; |
1163 | 1167 |
1164 } } // namespace v8::internal | 1168 } } // namespace v8::internal |
1165 | 1169 |
1166 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1170 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |