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

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

Issue 6902066: Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix an issue where a switch statement label ID could be used for both a load IC and a compare IC. Created 9 years, 8 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/type-info.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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void bind(NearLabel* L); 1181 void bind(NearLabel* L);
1182 1182
1183 // Calls 1183 // Calls
1184 // Call near relative 32-bit displacement, relative to next instruction. 1184 // Call near relative 32-bit displacement, relative to next instruction.
1185 void call(Label* L); 1185 void call(Label* L);
1186 void call(Handle<Code> target, RelocInfo::Mode rmode); 1186 void call(Handle<Code> target,
1187 RelocInfo::Mode rmode,
1188 unsigned ast_id = kNoASTId);
1187 1189
1188 // Calls directly to the given address using a relative offset. 1190 // Calls directly to the given address using a relative offset.
1189 // Should only ever be used in Code objects for calls within the 1191 // Should only ever be used in Code objects for calls within the
1190 // same Code object. Should not be used when generating new code (use labels), 1192 // same Code object. Should not be used when generating new code (use labels),
1191 // but only when patching existing code. 1193 // but only when patching existing code.
1192 void call(Address target); 1194 void call(Address target);
1193 1195
1194 // Call near absolute indirect, address in register 1196 // Call near absolute indirect, address in register
1195 void call(Register adr); 1197 void call(Register adr);
1196 1198
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1422 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1421 } 1423 }
1422 1424
1423 // code emission 1425 // code emission
1424 void GrowBuffer(); 1426 void GrowBuffer();
1425 1427
1426 void emit(byte x) { *pc_++ = x; } 1428 void emit(byte x) { *pc_++ = x; }
1427 inline void emitl(uint32_t x); 1429 inline void emitl(uint32_t x);
1428 inline void emitq(uint64_t x, RelocInfo::Mode rmode); 1430 inline void emitq(uint64_t x, RelocInfo::Mode rmode);
1429 inline void emitw(uint16_t x); 1431 inline void emitw(uint16_t x);
1430 inline void emit_code_target(Handle<Code> target, RelocInfo::Mode rmode); 1432 inline void emit_code_target(Handle<Code> target,
1433 RelocInfo::Mode rmode,
1434 unsigned ast_id = kNoASTId);
1431 void emit(Immediate x) { emitl(x.value_); } 1435 void emit(Immediate x) { emitl(x.value_); }
1432 1436
1433 // Emits a REX prefix that encodes a 64-bit operand size and 1437 // Emits a REX prefix that encodes a 64-bit operand size and
1434 // the top bit of both register codes. 1438 // the top bit of both register codes.
1435 // High bit of reg goes to REX.R, high bit of rm_reg goes to REX.B. 1439 // High bit of reg goes to REX.R, high bit of rm_reg goes to REX.B.
1436 // REX.W is set. 1440 // REX.W is set.
1437 inline void emit_rex_64(XMMRegister reg, Register rm_reg); 1441 inline void emit_rex_64(XMMRegister reg, Register rm_reg);
1438 inline void emit_rex_64(Register reg, XMMRegister rm_reg); 1442 inline void emit_rex_64(Register reg, XMMRegister rm_reg);
1439 inline void emit_rex_64(Register reg, Register rm_reg); 1443 inline void emit_rex_64(Register reg, Register rm_reg);
1440 1444
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 private: 1644 private:
1641 Assembler* assembler_; 1645 Assembler* assembler_;
1642 #ifdef DEBUG 1646 #ifdef DEBUG
1643 int space_before_; 1647 int space_before_;
1644 #endif 1648 #endif
1645 }; 1649 };
1646 1650
1647 } } // namespace v8::internal 1651 } } // namespace v8::internal
1648 1652
1649 #endif // V8_X64_ASSEMBLER_X64_H_ 1653 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698