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

Side by Side Diff: src/assembler.h

Issue 11574027: Use direct jump and call instruction for X64 when the deoptimization entries are in the code range (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 9 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
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 284 }
285 static inline bool IsConstructCall(Mode mode) { 285 static inline bool IsConstructCall(Mode mode) {
286 return mode == CONSTRUCT_CALL; 286 return mode == CONSTRUCT_CALL;
287 } 287 }
288 static inline bool IsCodeTarget(Mode mode) { 288 static inline bool IsCodeTarget(Mode mode) {
289 return mode <= LAST_CODE_ENUM; 289 return mode <= LAST_CODE_ENUM;
290 } 290 }
291 static inline bool IsEmbeddedObject(Mode mode) { 291 static inline bool IsEmbeddedObject(Mode mode) {
292 return mode == EMBEDDED_OBJECT; 292 return mode == EMBEDDED_OBJECT;
293 } 293 }
294 static inline bool IsRuntimeEntry(Mode mode) {
295 return mode == RUNTIME_ENTRY;
296 }
294 // Is the relocation mode affected by GC? 297 // Is the relocation mode affected by GC?
295 static inline bool IsGCRelocMode(Mode mode) { 298 static inline bool IsGCRelocMode(Mode mode) {
296 return mode <= LAST_GCED_ENUM; 299 return mode <= LAST_GCED_ENUM;
297 } 300 }
298 static inline bool IsJSReturn(Mode mode) { 301 static inline bool IsJSReturn(Mode mode) {
299 return mode == JS_RETURN; 302 return mode == JS_RETURN;
300 } 303 }
301 static inline bool IsComment(Mode mode) { 304 static inline bool IsComment(Mode mode) {
302 return mode == COMMENT; 305 return mode == COMMENT;
303 } 306 }
(...skipping 16 matching lines...) Expand all
320 return mode == DEBUG_BREAK_SLOT; 323 return mode == DEBUG_BREAK_SLOT;
321 } 324 }
322 static inline bool IsNone(Mode mode) { 325 static inline bool IsNone(Mode mode) {
323 return mode == NONE32 || mode == NONE64; 326 return mode == NONE32 || mode == NONE64;
324 } 327 }
325 static inline bool IsCodeAgeSequence(Mode mode) { 328 static inline bool IsCodeAgeSequence(Mode mode) {
326 return mode == CODE_AGE_SEQUENCE; 329 return mode == CODE_AGE_SEQUENCE;
327 } 330 }
328 static inline int ModeMask(Mode mode) { return 1 << mode; } 331 static inline int ModeMask(Mode mode) { return 1 << mode; }
329 332
333 static inline bool NeedsInitializeRuntimeEntry();
334
330 // Accessors 335 // Accessors
331 byte* pc() const { return pc_; } 336 byte* pc() const { return pc_; }
332 void set_pc(byte* pc) { pc_ = pc; } 337 void set_pc(byte* pc) { pc_ = pc; }
333 Mode rmode() const { return rmode_; } 338 Mode rmode() const { return rmode_; }
334 intptr_t data() const { return data_; } 339 intptr_t data() const { return data_; }
335 double data64() const { return data64_; } 340 double data64() const { return data64_; }
336 Code* host() const { return host_; } 341 Code* host() const { return host_; }
337 342
338 // Apply a relocation by delta bytes 343 // Apply a relocation by delta bytes
339 INLINE(void apply(intptr_t delta)); 344 INLINE(void apply(intptr_t delta));
340 345
341 // Is the pointer this relocation info refers to coded like a plain pointer 346 // Is the pointer this relocation info refers to coded like a plain pointer
342 // or is it strange in some way (e.g. relative or patched into a series of 347 // or is it strange in some way (e.g. relative or patched into a series of
343 // instructions). 348 // instructions).
344 bool IsCodedSpecially(); 349 bool IsCodedSpecially();
345 350
346 // Read/modify the code target in the branch/call instruction 351 // Read/modify the code target in the branch/call instruction
347 // this relocation applies to; 352 // this relocation applies to;
348 // can only be called if IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY 353 // can only be called if IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY
349 INLINE(Address target_address()); 354 INLINE(Address target_address());
350 INLINE(void set_target_address(Address target, 355 INLINE(void set_target_address(Address target,
351 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 356 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
352 INLINE(Object* target_object()); 357 INLINE(Object* target_object());
353 INLINE(Handle<Object> target_object_handle(Assembler* origin)); 358 INLINE(Handle<Object> target_object_handle(Assembler* origin));
359 INLINE(Address target_runtime_entry(Assembler* origin));
354 INLINE(Object** target_object_address()); 360 INLINE(Object** target_object_address());
355 INLINE(void set_target_object(Object* target, 361 INLINE(void set_target_object(Object* target,
356 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 362 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
357 INLINE(JSGlobalPropertyCell* target_cell()); 363 INLINE(JSGlobalPropertyCell* target_cell());
358 INLINE(Handle<JSGlobalPropertyCell> target_cell_handle()); 364 INLINE(Handle<JSGlobalPropertyCell> target_cell_handle());
359 INLINE(void set_target_cell(JSGlobalPropertyCell* cell, 365 INLINE(void set_target_cell(JSGlobalPropertyCell* cell,
360 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); 366 WriteBarrierMode mode = UPDATE_WRITE_BARRIER));
361 INLINE(Code* code_age_stub()); 367 INLINE(Code* code_age_stub());
362 INLINE(void set_code_age_stub(Code* stub)); 368 INLINE(void set_code_age_stub(Code* stub));
363 369
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 public: 996 public:
991 NullCallWrapper() { } 997 NullCallWrapper() { }
992 virtual ~NullCallWrapper() { } 998 virtual ~NullCallWrapper() { }
993 virtual void BeforeCall(int call_size) const { } 999 virtual void BeforeCall(int call_size) const { }
994 virtual void AfterCall() const { } 1000 virtual void AfterCall() const { }
995 }; 1001 };
996 1002
997 } } // namespace v8::internal 1003 } } // namespace v8::internal
998 1004
999 #endif // V8_ASSEMBLER_H_ 1005 #endif // V8_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698