| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   383   // for a detailed comment on the layout (globals.h). |   383   // for a detailed comment on the layout (globals.h). | 
|   384   // |   384   // | 
|   385   // If the provided buffer is NULL, the assembler allocates and grows its own |   385   // If the provided buffer is NULL, the assembler allocates and grows its own | 
|   386   // buffer, and buffer_size determines the initial buffer size. The buffer is |   386   // buffer, and buffer_size determines the initial buffer size. The buffer is | 
|   387   // owned by the assembler and deallocated upon destruction of the assembler. |   387   // owned by the assembler and deallocated upon destruction of the assembler. | 
|   388   // |   388   // | 
|   389   // If the provided buffer is not NULL, the assembler uses the provided buffer |   389   // If the provided buffer is not NULL, the assembler uses the provided buffer | 
|   390   // for code generation and assumes its size to be buffer_size. If the buffer |   390   // for code generation and assumes its size to be buffer_size. If the buffer | 
|   391   // is too small, a fatal error occurs. No deallocation of the buffer is done |   391   // is too small, a fatal error occurs. No deallocation of the buffer is done | 
|   392   // upon destruction of the assembler. |   392   // upon destruction of the assembler. | 
|   393   Assembler(Isolate* isolate, void* buffer, int buffer_size); |   393   Assembler(Isolate* isolate, void* buffer, int buffer_size) | 
 |   394       : Assembler(IsolateData(isolate), buffer, buffer_size) {} | 
 |   395   Assembler(IsolateData isolate_data, void* buffer, int buffer_size); | 
|   394   virtual ~Assembler() { } |   396   virtual ~Assembler() { } | 
|   395  |   397  | 
|   396   // GetCode emits any pending (non-emitted) code and fills the descriptor |   398   // GetCode emits any pending (non-emitted) code and fills the descriptor | 
|   397   // desc. GetCode() is idempotent; it returns the same result if no other |   399   // desc. GetCode() is idempotent; it returns the same result if no other | 
|   398   // Assembler functions are invoked in between GetCode() calls. |   400   // Assembler functions are invoked in between GetCode() calls. | 
|   399   void GetCode(CodeDesc* desc); |   401   void GetCode(CodeDesc* desc); | 
|   400  |   402  | 
|   401   // Label operations & relative jumps (PPUM Appendix D). |   403   // Label operations & relative jumps (PPUM Appendix D). | 
|   402   // |   404   // | 
|   403   // Takes a branch opcode (cc) and a label (L) and generates |   405   // Takes a branch opcode (cc) and a label (L) and generates | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   455     return branch_offset26(L) >> 2; |   457     return branch_offset26(L) >> 2; | 
|   456   } |   458   } | 
|   457   uint64_t jump_address(Label* L); |   459   uint64_t jump_address(Label* L); | 
|   458   uint64_t jump_offset(Label* L); |   460   uint64_t jump_offset(Label* L); | 
|   459  |   461  | 
|   460   // Puts a labels target address at the given position. |   462   // Puts a labels target address at the given position. | 
|   461   // The high 8 bits are set to zero. |   463   // The high 8 bits are set to zero. | 
|   462   void label_at_put(Label* L, int at_offset); |   464   void label_at_put(Label* L, int at_offset); | 
|   463  |   465  | 
|   464   // Read/Modify the code target address in the branch/call instruction at pc. |   466   // Read/Modify the code target address in the branch/call instruction at pc. | 
 |   467   // The isolate argument is unused (and may be nullptr) when skipping flushing. | 
|   465   static Address target_address_at(Address pc); |   468   static Address target_address_at(Address pc); | 
|   466   static void set_target_address_at( |   469   static void set_target_address_at( | 
|   467       Isolate* isolate, Address pc, Address target, |   470       Isolate* isolate, Address pc, Address target, | 
|   468       ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); |   471       ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); | 
|   469   // On MIPS there is no Constant Pool so we skip that parameter. |   472   // On MIPS there is no Constant Pool so we skip that parameter. | 
|   470   INLINE(static Address target_address_at(Address pc, Address constant_pool)) { |   473   INLINE(static Address target_address_at(Address pc, Address constant_pool)) { | 
|   471     return target_address_at(pc); |   474     return target_address_at(pc); | 
|   472   } |   475   } | 
|   473   INLINE(static void set_target_address_at( |   476   INLINE(static void set_target_address_at( | 
|   474       Isolate* isolate, Address pc, Address constant_pool, Address target, |   477       Isolate* isolate, Address pc, Address constant_pool, Address target, | 
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1523  public: |  1526  public: | 
|  1524   explicit EnsureSpace(Assembler* assembler) { |  1527   explicit EnsureSpace(Assembler* assembler) { | 
|  1525     assembler->CheckBuffer(); |  1528     assembler->CheckBuffer(); | 
|  1526   } |  1529   } | 
|  1527 }; |  1530 }; | 
|  1528  |  1531  | 
|  1529 }  // namespace internal |  1532 }  // namespace internal | 
|  1530 }  // namespace v8 |  1533 }  // namespace v8 | 
|  1531  |  1534  | 
|  1532 #endif  // V8_ARM_ASSEMBLER_MIPS_H_ |  1535 #endif  // V8_ARM_ASSEMBLER_MIPS_H_ | 
| OLD | NEW |