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

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

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 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
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/s390/assembler-s390.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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // for a detailed comment on the layout (globals.h). 390 // for a detailed comment on the layout (globals.h).
391 // 391 //
392 // If the provided buffer is NULL, the assembler allocates and grows its own 392 // If the provided buffer is NULL, the assembler allocates and grows its own
393 // buffer, and buffer_size determines the initial buffer size. The buffer is 393 // buffer, and buffer_size determines the initial buffer size. The buffer is
394 // owned by the assembler and deallocated upon destruction of the assembler. 394 // owned by the assembler and deallocated upon destruction of the assembler.
395 // 395 //
396 // If the provided buffer is not NULL, the assembler uses the provided buffer 396 // If the provided buffer is not NULL, the assembler uses the provided buffer
397 // for code generation and assumes its size to be buffer_size. If the buffer 397 // for code generation and assumes its size to be buffer_size. If the buffer
398 // is too small, a fatal error occurs. No deallocation of the buffer is done 398 // is too small, a fatal error occurs. No deallocation of the buffer is done
399 // upon destruction of the assembler. 399 // upon destruction of the assembler.
400 Assembler(Isolate* isolate, void* buffer, int buffer_size); 400 Assembler(Isolate* isolate, void* buffer, int buffer_size)
401 : Assembler(IsolateData(isolate), buffer, buffer_size) {}
402 Assembler(IsolateData isolate_data, void* buffer, int buffer_size);
401 virtual ~Assembler() {} 403 virtual ~Assembler() {}
402 404
403 // GetCode emits any pending (non-emitted) code and fills the descriptor 405 // GetCode emits any pending (non-emitted) code and fills the descriptor
404 // desc. GetCode() is idempotent; it returns the same result if no other 406 // desc. GetCode() is idempotent; it returns the same result if no other
405 // Assembler functions are invoked in between GetCode() calls. 407 // Assembler functions are invoked in between GetCode() calls.
406 void GetCode(CodeDesc* desc); 408 void GetCode(CodeDesc* desc);
407 409
408 // Label operations & relative jumps (PPUM Appendix D) 410 // Label operations & relative jumps (PPUM Appendix D)
409 // 411 //
410 // Takes a branch opcode (cc) and a label (L) and generates 412 // Takes a branch opcode (cc) and a label (L) and generates
(...skipping 23 matching lines...) Expand all
434 // Returns the branch offset to the given label from the current code position 436 // Returns the branch offset to the given label from the current code position
435 // Links the label to the current position if it is still unbound 437 // Links the label to the current position if it is still unbound
436 int branch_offset(Label* L) { return link(L) - pc_offset(); } 438 int branch_offset(Label* L) { return link(L) - pc_offset(); }
437 439
438 // Puts a labels target address at the given position. 440 // Puts a labels target address at the given position.
439 // The high 8 bits are set to zero. 441 // The high 8 bits are set to zero.
440 void label_at_put(Label* L, int at_offset); 442 void label_at_put(Label* L, int at_offset);
441 void load_label_offset(Register r1, Label* L); 443 void load_label_offset(Register r1, Label* L);
442 444
443 // Read/Modify the code target address in the branch/call instruction at pc. 445 // Read/Modify the code target address in the branch/call instruction at pc.
446 // The isolate argument is unused (and may be nullptr) when skipping flushing.
444 INLINE(static Address target_address_at(Address pc, Address constant_pool)); 447 INLINE(static Address target_address_at(Address pc, Address constant_pool));
445 INLINE(static void set_target_address_at( 448 INLINE(static void set_target_address_at(
446 Isolate* isolate, Address pc, Address constant_pool, Address target, 449 Isolate* isolate, Address pc, Address constant_pool, Address target,
447 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); 450 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED));
448 INLINE(static Address target_address_at(Address pc, Code* code)); 451 INLINE(static Address target_address_at(Address pc, Code* code));
449 INLINE(static void set_target_address_at( 452 INLINE(static void set_target_address_at(
450 Isolate* isolate, Address pc, Code* code, Address target, 453 Isolate* isolate, Address pc, Code* code, Address target,
451 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); 454 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED));
452 455
453 // Return the code target address at a call site from the return address 456 // Return the code target address at a call site from the return address
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1475
1473 class EnsureSpace BASE_EMBEDDED { 1476 class EnsureSpace BASE_EMBEDDED {
1474 public: 1477 public:
1475 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } 1478 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); }
1476 }; 1479 };
1477 1480
1478 } // namespace internal 1481 } // namespace internal
1479 } // namespace v8 1482 } // namespace v8
1480 1483
1481 #endif // V8_S390_ASSEMBLER_S390_H_ 1484 #endif // V8_S390_ASSEMBLER_S390_H_
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/s390/assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698