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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 void Assembler::emit(uint32_t x) { | 294 void Assembler::emit(uint32_t x) { |
295 *reinterpret_cast<uint32_t*>(pc_) = x; | 295 *reinterpret_cast<uint32_t*>(pc_) = x; |
296 pc_ += sizeof(uint32_t); | 296 pc_ += sizeof(uint32_t); |
297 } | 297 } |
298 | 298 |
299 | 299 |
300 void Assembler::emit(Handle<Object> handle) { | 300 void Assembler::emit(Handle<Object> handle) { |
301 // Verify all Objects referred by code are NOT in new space. | 301 // Verify all Objects referred by code are NOT in new space. |
302 Object* obj = *handle; | 302 Object* obj = *handle; |
303 ASSERT(!HEAP->InNewSpace(obj)); | 303 ASSERT(!isolate()->heap()->InNewSpace(obj)); |
304 if (obj->IsHeapObject()) { | 304 if (obj->IsHeapObject()) { |
305 emit(reinterpret_cast<intptr_t>(handle.location()), | 305 emit(reinterpret_cast<intptr_t>(handle.location()), |
306 RelocInfo::EMBEDDED_OBJECT); | 306 RelocInfo::EMBEDDED_OBJECT); |
307 } else { | 307 } else { |
308 // no relocation needed | 308 // no relocation needed |
309 emit(reinterpret_cast<intptr_t>(obj)); | 309 emit(reinterpret_cast<intptr_t>(obj)); |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 | 313 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 422 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
423 // [disp/r] | 423 // [disp/r] |
424 set_modrm(0, ebp); | 424 set_modrm(0, ebp); |
425 set_dispr(disp, rmode); | 425 set_dispr(disp, rmode); |
426 } | 426 } |
427 | 427 |
428 } } // namespace v8::internal | 428 } } // namespace v8::internal |
429 | 429 |
430 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 430 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |