Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: src/x64/assembler-x64.h

Issue 6928060: Merge Label and NearLabel (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Unconditional jump to L
1207 void jmp(Label* L, Label::Distance distance = Label::kFar);
1206 void jmp(Handle<Code> target, RelocInfo::Mode rmode); 1208 void jmp(Handle<Code> target, RelocInfo::Mode rmode);
1207 1209
1208 // Jump near absolute indirect (r64) 1210 // Jump near absolute indirect (r64)
1209 void jmp(Register adr); 1211 void jmp(Register adr);
1210 1212
1211 // Jump near absolute indirect (m64) 1213 // Jump near absolute indirect (m64)
1212 void jmp(const Operand& src); 1214 void jmp(const Operand& src);
1213 1215
1214 // Short jump 1216 // Short jump
1217 // DEPRECATED. Use jmp(L, Label::kNear) instead.
1215 void jmp(NearLabel* L); 1218 void jmp(NearLabel* L);
1216 1219
1217 // Conditional jumps 1220 // Conditional jumps
1218 void j(Condition cc, Label* L); 1221 void j(Condition cc,
1222 Label* L,
1223 Hint hint,
1224 Label::Distance distance = Label::kFar);
1225 void j(Condition cc, Label* L, Label::Distance distance = Label::kFar) {
1226 j(cc, L, no_hint, distance);
1227 }
1219 void j(Condition cc, Handle<Code> target, RelocInfo::Mode rmode); 1228 void j(Condition cc, Handle<Code> target, RelocInfo::Mode rmode);
1220 1229
1221 // Conditional short jump 1230 // Conditional short jump
1231 // DEPRECATED. Use jmp(L, Label::kNear) instead.
1222 void j(Condition cc, NearLabel* L, Hint hint = no_hint); 1232 void j(Condition cc, NearLabel* L, Hint hint = no_hint);
1223 1233
1224 // Floating-point operations 1234 // Floating-point operations
1225 void fld(int i); 1235 void fld(int i);
1226 1236
1227 void fld1(); 1237 void fld1();
1228 void fldz(); 1238 void fldz();
1229 void fldpi(); 1239 void fldpi();
1230 void fldln2(); 1240 void fldln2();
1231 1241
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 private: 1654 private:
1645 Assembler* assembler_; 1655 Assembler* assembler_;
1646 #ifdef DEBUG 1656 #ifdef DEBUG
1647 int space_before_; 1657 int space_before_;
1648 #endif 1658 #endif
1649 }; 1659 };
1650 1660
1651 } } // namespace v8::internal 1661 } } // namespace v8::internal
1652 1662
1653 #endif // V8_X64_ASSEMBLER_X64_H_ 1663 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698