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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // GetCode emits any pending (non-emitted) code and fills the descriptor | 486 // GetCode emits any pending (non-emitted) code and fills the descriptor |
487 // desc. GetCode() is idempotent; it returns the same result if no other | 487 // desc. GetCode() is idempotent; it returns the same result if no other |
488 // Assembler functions are invoked in between GetCode() calls. | 488 // Assembler functions are invoked in between GetCode() calls. |
489 void GetCode(CodeDesc* desc); | 489 void GetCode(CodeDesc* desc); |
490 | 490 |
491 // Read/Modify the code target in the branch/call instruction at pc. | 491 // Read/Modify the code target in the branch/call instruction at pc. |
492 inline static Address target_address_at(Address pc, | 492 inline static Address target_address_at(Address pc, |
493 ConstantPoolArray* constant_pool); | 493 ConstantPoolArray* constant_pool); |
494 inline static void set_target_address_at(Address pc, | 494 inline static void set_target_address_at(Address pc, |
495 ConstantPoolArray* constant_pool, | 495 ConstantPoolArray* constant_pool, |
496 Address target); | 496 Address target, |
| 497 ICacheFlushMode icache_flush_mode = |
| 498 FLUSH_ICACHE_IF_NEEDED); |
497 static inline Address target_address_at(Address pc, Code* code) { | 499 static inline Address target_address_at(Address pc, Code* code) { |
498 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | 500 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; |
499 return target_address_at(pc, constant_pool); | 501 return target_address_at(pc, constant_pool); |
500 } | 502 } |
501 static inline void set_target_address_at(Address pc, | 503 static inline void set_target_address_at(Address pc, |
502 Code* code, | 504 Code* code, |
503 Address target) { | 505 Address target, |
| 506 ICacheFlushMode icache_flush_mode = |
| 507 FLUSH_ICACHE_IF_NEEDED) { |
504 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; | 508 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL; |
505 set_target_address_at(pc, constant_pool, target); | 509 set_target_address_at(pc, constant_pool, target); |
506 } | 510 } |
507 | 511 |
508 // Return the code target address at a call site from the return address | 512 // Return the code target address at a call site from the return address |
509 // of that call in the instruction stream. | 513 // of that call in the instruction stream. |
510 inline static Address target_address_from_return_address(Address pc); | 514 inline static Address target_address_from_return_address(Address pc); |
511 | 515 |
512 // This sets the branch destination (which is in the instruction on x86). | 516 // This sets the branch destination (which is in the instruction on x86). |
513 // This is for calls and branches within generated code. | 517 // This is for calls and branches within generated code. |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 private: | 1159 private: |
1156 Assembler* assembler_; | 1160 Assembler* assembler_; |
1157 #ifdef DEBUG | 1161 #ifdef DEBUG |
1158 int space_before_; | 1162 int space_before_; |
1159 #endif | 1163 #endif |
1160 }; | 1164 }; |
1161 | 1165 |
1162 } } // namespace v8::internal | 1166 } } // namespace v8::internal |
1163 | 1167 |
1164 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1168 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |