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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 x_ = x; | 152 x_ = x; |
153 rmode_ = RelocInfo::NONE; | 153 rmode_ = RelocInfo::NONE; |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 Immediate::Immediate(const ExternalReference& ext) { | 157 Immediate::Immediate(const ExternalReference& ext) { |
158 x_ = reinterpret_cast<int32_t>(ext.address()); | 158 x_ = reinterpret_cast<int32_t>(ext.address()); |
159 rmode_ = RelocInfo::EXTERNAL_REFERENCE; | 159 rmode_ = RelocInfo::EXTERNAL_REFERENCE; |
160 } | 160 } |
161 | 161 |
162 Immediate::Immediate(const char* s) { | |
163 x_ = reinterpret_cast<int32_t>(s); | |
164 rmode_ = RelocInfo::EMBEDDED_STRING; | |
165 } | |
166 | |
167 | 162 |
168 Immediate::Immediate(Label* internal_offset) { | 163 Immediate::Immediate(Label* internal_offset) { |
169 x_ = reinterpret_cast<int32_t>(internal_offset); | 164 x_ = reinterpret_cast<int32_t>(internal_offset); |
170 rmode_ = RelocInfo::INTERNAL_REFERENCE; | 165 rmode_ = RelocInfo::INTERNAL_REFERENCE; |
171 } | 166 } |
172 | 167 |
173 | 168 |
174 Immediate::Immediate(Handle<Object> handle) { | 169 Immediate::Immediate(Handle<Object> handle) { |
175 // Verify all Objects referred by code are NOT in new space. | 170 // Verify all Objects referred by code are NOT in new space. |
176 Object* obj = *handle; | 171 Object* obj = *handle; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 317 |
323 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 318 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
324 // [disp/r] | 319 // [disp/r] |
325 set_modrm(0, ebp); | 320 set_modrm(0, ebp); |
326 set_dispr(disp, rmode); | 321 set_dispr(disp, rmode); |
327 } | 322 } |
328 | 323 |
329 } } // namespace v8::internal | 324 } } // namespace v8::internal |
330 | 325 |
331 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 326 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |