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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 | 79 |
80 void RelocInfo::set_target_address(Address target) { | 80 void RelocInfo::set_target_address(Address target) { |
81 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); | 81 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); |
82 Assembler::set_target_address_at(pc_, target); | 82 Assembler::set_target_address_at(pc_, target); |
83 } | 83 } |
84 | 84 |
85 | 85 |
86 Object* RelocInfo::target_object() { | 86 Object* RelocInfo::target_object() { |
87 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 87 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
88 return *reinterpret_cast<Object**>(pc_); | 88 return Memory::Object_at(pc_); |
| 89 } |
| 90 |
| 91 |
| 92 Handle<Object> RelocInfo::target_object_handle(Assembler *origin) { |
| 93 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 94 return Memory::Object_Handle_at(pc_); |
89 } | 95 } |
90 | 96 |
91 | 97 |
92 Object** RelocInfo::target_object_address() { | 98 Object** RelocInfo::target_object_address() { |
93 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 99 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
94 return reinterpret_cast<Object**>(pc_); | 100 return &Memory::Object_at(pc_); |
95 } | 101 } |
96 | 102 |
97 | 103 |
98 void RelocInfo::set_target_object(Object* target) { | 104 void RelocInfo::set_target_object(Object* target) { |
99 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 105 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
100 *reinterpret_cast<Object**>(pc_) = target; | 106 Memory::Object_at(pc_) = target; |
101 } | 107 } |
102 | 108 |
103 | 109 |
104 Address* RelocInfo::target_reference_address() { | 110 Address* RelocInfo::target_reference_address() { |
105 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 111 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
106 return reinterpret_cast<Address*>(pc_); | 112 return reinterpret_cast<Address*>(pc_); |
107 } | 113 } |
108 | 114 |
109 | 115 |
110 Address RelocInfo::call_address() { | 116 Address RelocInfo::call_address() { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 316 |
311 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 317 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
312 // [disp/r] | 318 // [disp/r] |
313 set_modrm(0, ebp); | 319 set_modrm(0, ebp); |
314 set_dispr(disp, rmode); | 320 set_dispr(disp, rmode); |
315 } | 321 } |
316 | 322 |
317 } } // namespace v8::internal | 323 } } // namespace v8::internal |
318 | 324 |
319 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 325 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |