| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 // Assembler functions are invoked in between GetCode() calls. | 529 // Assembler functions are invoked in between GetCode() calls. |
| 530 void GetCode(CodeDesc* desc); | 530 void GetCode(CodeDesc* desc); |
| 531 | 531 |
| 532 // Read/Modify the code target in the relative branch/call instruction at pc. | 532 // Read/Modify the code target in the relative branch/call instruction at pc. |
| 533 // On the x64 architecture, we use relative jumps with a 32-bit displacement | 533 // On the x64 architecture, we use relative jumps with a 32-bit displacement |
| 534 // to jump to other Code objects in the Code space in the heap. | 534 // to jump to other Code objects in the Code space in the heap. |
| 535 // Jumps to C functions are done indirectly through a 64-bit register holding | 535 // Jumps to C functions are done indirectly through a 64-bit register holding |
| 536 // the absolute address of the target. | 536 // the absolute address of the target. |
| 537 // These functions convert between absolute Addresses of Code objects and | 537 // These functions convert between absolute Addresses of Code objects and |
| 538 // the relative displacements stored in the code. | 538 // the relative displacements stored in the code. |
| 539 static inline Address target_address_at(Address pc, | 539 static inline Address target_address_at(Address pc, Address constant_pool); |
| 540 ConstantPoolArray* constant_pool); | 540 static inline void set_target_address_at( |
| 541 static inline void set_target_address_at(Address pc, | 541 Address pc, Address constant_pool, Address target, |
| 542 ConstantPoolArray* constant_pool, | 542 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); |
| 543 Address target, | |
| 544 ICacheFlushMode icache_flush_mode = | |
| 545 FLUSH_ICACHE_IF_NEEDED) ; | |
| 546 static inline Address target_address_at(Address pc, Code* code) { | 543 static inline Address target_address_at(Address pc, Code* code) { |
| 547 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | 544 Address constant_pool = code ? code->constant_pool() : NULL; |
| 548 return target_address_at(pc, constant_pool); | 545 return target_address_at(pc, constant_pool); |
| 549 } | 546 } |
| 550 static inline void set_target_address_at(Address pc, | 547 static inline void set_target_address_at(Address pc, |
| 551 Code* code, | 548 Code* code, |
| 552 Address target, | 549 Address target, |
| 553 ICacheFlushMode icache_flush_mode = | 550 ICacheFlushMode icache_flush_mode = |
| 554 FLUSH_ICACHE_IF_NEEDED) { | 551 FLUSH_ICACHE_IF_NEEDED) { |
| 555 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | 552 Address constant_pool = code ? code->constant_pool() : NULL; |
| 556 set_target_address_at(pc, constant_pool, target, icache_flush_mode); | 553 set_target_address_at(pc, constant_pool, target, icache_flush_mode); |
| 557 } | 554 } |
| 558 | 555 |
| 559 // Return the code target address at a call site from the return address | 556 // Return the code target address at a call site from the return address |
| 560 // of that call in the instruction stream. | 557 // of that call in the instruction stream. |
| 561 static inline Address target_address_from_return_address(Address pc); | 558 static inline Address target_address_from_return_address(Address pc); |
| 562 | 559 |
| 563 // Return the code target address of the patch debug break slot | 560 // Return the code target address of the patch debug break slot |
| 564 inline static Address break_address_from_return_address(Address pc); | 561 inline static Address break_address_from_return_address(Address pc); |
| 565 | 562 |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1887 private: | 1884 private: |
| 1888 Assembler* assembler_; | 1885 Assembler* assembler_; |
| 1889 #ifdef DEBUG | 1886 #ifdef DEBUG |
| 1890 int space_before_; | 1887 int space_before_; |
| 1891 #endif | 1888 #endif |
| 1892 }; | 1889 }; |
| 1893 | 1890 |
| 1894 } } // namespace v8::internal | 1891 } } // namespace v8::internal |
| 1895 | 1892 |
| 1896 #endif // V8_X64_ASSEMBLER_X64_H_ | 1893 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |