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 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 // Label L; // unbound label | 1171 // Label L; // unbound label |
1172 // j(cc, &L); // forward branch to unbound label | 1172 // j(cc, &L); // forward branch to unbound label |
1173 // bind(&L); // bind label to the current pc | 1173 // bind(&L); // bind label to the current pc |
1174 // j(cc, &L); // backward branch to bound label | 1174 // j(cc, &L); // backward branch to bound label |
1175 // bind(&L); // illegal: a label may be bound only once | 1175 // bind(&L); // illegal: a label may be bound only once |
1176 // | 1176 // |
1177 // Note: The same Label can be used for forward and backward branches | 1177 // Note: The same Label can be used for forward and backward branches |
1178 // but it may be bound only once. | 1178 // but it may be bound only once. |
1179 | 1179 |
1180 void bind(Label* L); // binds an unbound label L to the current code position | 1180 void bind(Label* L); // binds an unbound label L to the current code position |
| 1181 // DEPRECATED. Use bind(Label*) with jmp(Label*, Label::kNear) instead. |
1181 void bind(NearLabel* L); | 1182 void bind(NearLabel* L); |
1182 | 1183 |
1183 // Calls | 1184 // Calls |
1184 // Call near relative 32-bit displacement, relative to next instruction. | 1185 // Call near relative 32-bit displacement, relative to next instruction. |
1185 void call(Label* L); | 1186 void call(Label* L); |
1186 void call(Handle<Code> target, | 1187 void call(Handle<Code> target, |
1187 RelocInfo::Mode rmode, | 1188 RelocInfo::Mode rmode, |
1188 unsigned ast_id = kNoASTId); | 1189 unsigned ast_id = kNoASTId); |
1189 | 1190 |
1190 // Calls directly to the given address using a relative offset. | 1191 // Calls directly to the given address using a relative offset. |
1191 // Should only ever be used in Code objects for calls within the | 1192 // Should only ever be used in Code objects for calls within the |
1192 // same Code object. Should not be used when generating new code (use labels), | 1193 // same Code object. Should not be used when generating new code (use labels), |
1193 // but only when patching existing code. | 1194 // but only when patching existing code. |
1194 void call(Address target); | 1195 void call(Address target); |
1195 | 1196 |
1196 // Call near absolute indirect, address in register | 1197 // Call near absolute indirect, address in register |
1197 void call(Register adr); | 1198 void call(Register adr); |
1198 | 1199 |
1199 // Call near indirect | 1200 // Call near indirect |
1200 void call(const Operand& operand); | 1201 void call(const Operand& operand); |
1201 | 1202 |
1202 // Jumps | 1203 // Jumps |
1203 // Jump short or near relative. | 1204 // Jump short or near relative. |
1204 // Use a 32-bit signed displacement. | 1205 // Use a 32-bit signed displacement. |
1205 void jmp(Label* L); // unconditional jump to L | 1206 void jmp(Label* L, bool near = Label::kFar); // unconditional jump to L |
1206 void jmp(Handle<Code> target, RelocInfo::Mode rmode); | 1207 void jmp(Handle<Code> target, RelocInfo::Mode rmode); |
1207 | 1208 |
1208 // Jump near absolute indirect (r64) | 1209 // Jump near absolute indirect (r64) |
1209 void jmp(Register adr); | 1210 void jmp(Register adr); |
1210 | 1211 |
1211 // Jump near absolute indirect (m64) | 1212 // Jump near absolute indirect (m64) |
1212 void jmp(const Operand& src); | 1213 void jmp(const Operand& src); |
1213 | 1214 |
1214 // Short jump | 1215 // Short jump |
| 1216 // DEPRECATED. Use jmp(L, Label::kNear) instead. |
1215 void jmp(NearLabel* L); | 1217 void jmp(NearLabel* L); |
1216 | 1218 |
1217 // Conditional jumps | 1219 // Conditional jumps |
1218 void j(Condition cc, Label* L); | 1220 void j(Condition cc, Label* L, bool near = Label::kFar, Hint hint = no_hint); |
1219 void j(Condition cc, Handle<Code> target, RelocInfo::Mode rmode); | 1221 void j(Condition cc, Handle<Code> target, RelocInfo::Mode rmode); |
1220 | 1222 |
1221 // Conditional short jump | 1223 // Conditional short jump |
| 1224 // DEPRECATED. Use jmp(L, Label::kNear) instead. |
1222 void j(Condition cc, NearLabel* L, Hint hint = no_hint); | 1225 void j(Condition cc, NearLabel* L, Hint hint = no_hint); |
1223 | 1226 |
1224 // Floating-point operations | 1227 // Floating-point operations |
1225 void fld(int i); | 1228 void fld(int i); |
1226 | 1229 |
1227 void fld1(); | 1230 void fld1(); |
1228 void fldz(); | 1231 void fldz(); |
1229 void fldpi(); | 1232 void fldpi(); |
1230 void fldln2(); | 1233 void fldln2(); |
1231 | 1234 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1644 private: | 1647 private: |
1645 Assembler* assembler_; | 1648 Assembler* assembler_; |
1646 #ifdef DEBUG | 1649 #ifdef DEBUG |
1647 int space_before_; | 1650 int space_before_; |
1648 #endif | 1651 #endif |
1649 }; | 1652 }; |
1650 | 1653 |
1651 } } // namespace v8::internal | 1654 } } // namespace v8::internal |
1652 | 1655 |
1653 #endif // V8_X64_ASSEMBLER_X64_H_ | 1656 #endif // V8_X64_ASSEMBLER_X64_H_ |
OLD | NEW |