| 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 // of that call in the instruction stream. | 631 // of that call in the instruction stream. |
| 632 inline static Address target_address_from_return_address(Address pc); | 632 inline static Address target_address_from_return_address(Address pc); |
| 633 | 633 |
| 634 // This sets the branch destination (which is in the instruction on x86). | 634 // This sets the branch destination (which is in the instruction on x86). |
| 635 // This is for calls and branches within generated code. | 635 // This is for calls and branches within generated code. |
| 636 inline static void deserialization_set_special_target_at( | 636 inline static void deserialization_set_special_target_at( |
| 637 Address instruction_payload, Address target) { | 637 Address instruction_payload, Address target) { |
| 638 set_target_address_at(instruction_payload, target); | 638 set_target_address_at(instruction_payload, target); |
| 639 } | 639 } |
| 640 | 640 |
| 641 // This sets the branch destination (which is in the instruction on x86). | |
| 642 // This is for calls and branches to runtime code. | |
| 643 inline static void set_external_target_at(Address instruction_payload, | |
| 644 Address target) { | |
| 645 set_target_address_at(instruction_payload, target); | |
| 646 } | |
| 647 | |
| 648 static const int kSpecialTargetSize = kPointerSize; | 641 static const int kSpecialTargetSize = kPointerSize; |
| 649 | 642 |
| 650 // Distance between the address of the code target in the call instruction | 643 // Distance between the address of the code target in the call instruction |
| 651 // and the return address | 644 // and the return address |
| 652 static const int kCallTargetAddressOffset = kPointerSize; | 645 static const int kCallTargetAddressOffset = kPointerSize; |
| 653 // Distance between start of patched return sequence and the emitted address | 646 // Distance between start of patched return sequence and the emitted address |
| 654 // to jump to. | 647 // to jump to. |
| 655 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. | 648 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. |
| 656 | 649 |
| 657 // Distance between start of patched debug break slot and the emitted address | 650 // Distance between start of patched debug break slot and the emitted address |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 private: | 1267 private: |
| 1275 Assembler* assembler_; | 1268 Assembler* assembler_; |
| 1276 #ifdef DEBUG | 1269 #ifdef DEBUG |
| 1277 int space_before_; | 1270 int space_before_; |
| 1278 #endif | 1271 #endif |
| 1279 }; | 1272 }; |
| 1280 | 1273 |
| 1281 } } // namespace v8::internal | 1274 } } // namespace v8::internal |
| 1282 | 1275 |
| 1283 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1276 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |