| 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // desc. GetCode() is idempotent; it returns the same result if no other | 591 // desc. GetCode() is idempotent; it returns the same result if no other |
| 592 // Assembler functions are invoked in between GetCode() calls. | 592 // Assembler functions are invoked in between GetCode() calls. |
| 593 void GetCode(CodeDesc* desc); | 593 void GetCode(CodeDesc* desc); |
| 594 | 594 |
| 595 // Read/Modify the code target in the branch/call instruction at pc. | 595 // Read/Modify the code target in the branch/call instruction at pc. |
| 596 inline static Address target_address_at(Address pc); | 596 inline static Address target_address_at(Address pc); |
| 597 inline static void set_target_address_at(Address pc, Address target); | 597 inline static void set_target_address_at(Address pc, Address target); |
| 598 | 598 |
| 599 // This sets the branch destination (which is in the instruction on x86). | 599 // This sets the branch destination (which is in the instruction on x86). |
| 600 // This is for calls and branches within generated code. | 600 // This is for calls and branches within generated code. |
| 601 inline static void set_target_at(Address instruction_payload, | 601 inline static void deserialization_set_special_target_at( |
| 602 Address target) { | 602 Address instruction_payload, Address target) { |
| 603 set_target_address_at(instruction_payload, target); | 603 set_target_address_at(instruction_payload, target); |
| 604 } | 604 } |
| 605 | 605 |
| 606 // This sets the branch destination (which is in the instruction on x86). | 606 // This sets the branch destination (which is in the instruction on x86). |
| 607 // This is for calls and branches to runtime code. | 607 // This is for calls and branches to runtime code. |
| 608 inline static void set_external_target_at(Address instruction_payload, | 608 inline static void set_external_target_at(Address instruction_payload, |
| 609 Address target) { | 609 Address target) { |
| 610 set_target_address_at(instruction_payload, target); | 610 set_target_address_at(instruction_payload, target); |
| 611 } | 611 } |
| 612 | 612 |
| 613 static const int kCallTargetSize = kPointerSize; | 613 static const int kSpecialTargetSize = kPointerSize; |
| 614 static const int kExternalTargetSize = kPointerSize; | |
| 615 | 614 |
| 616 // Distance between the address of the code target in the call instruction | 615 // Distance between the address of the code target in the call instruction |
| 617 // and the return address | 616 // and the return address |
| 618 static const int kCallTargetAddressOffset = kPointerSize; | 617 static const int kCallTargetAddressOffset = kPointerSize; |
| 619 // Distance between start of patched return sequence and the emitted address | 618 // Distance between start of patched return sequence and the emitted address |
| 620 // to jump to. | 619 // to jump to. |
| 621 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. | 620 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. |
| 622 | 621 |
| 623 // Distance between start of patched debug break slot and the emitted address | 622 // Distance between start of patched debug break slot and the emitted address |
| 624 // to jump to. | 623 // to jump to. |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 private: | 1211 private: |
| 1213 Assembler* assembler_; | 1212 Assembler* assembler_; |
| 1214 #ifdef DEBUG | 1213 #ifdef DEBUG |
| 1215 int space_before_; | 1214 int space_before_; |
| 1216 #endif | 1215 #endif |
| 1217 }; | 1216 }; |
| 1218 | 1217 |
| 1219 } } // namespace v8::internal | 1218 } } // namespace v8::internal |
| 1220 | 1219 |
| 1221 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1220 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |