| 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 if (obj->IsHeapObject()) { | 293 if (obj->IsHeapObject()) { |
| 294 emit(reinterpret_cast<intptr_t>(handle.location()), | 294 emit(reinterpret_cast<intptr_t>(handle.location()), |
| 295 RelocInfo::EMBEDDED_OBJECT); | 295 RelocInfo::EMBEDDED_OBJECT); |
| 296 } else { | 296 } else { |
| 297 // no relocation needed | 297 // no relocation needed |
| 298 emit(reinterpret_cast<intptr_t>(obj)); | 298 emit(reinterpret_cast<intptr_t>(obj)); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 | 302 |
| 303 void Assembler::emit(uint32_t x, RelocInfo::Mode rmode) { | 303 void Assembler::emit(uint32_t x, RelocInfo::Mode rmode, AstId id) { |
| 304 if (rmode != RelocInfo::NONE) RecordRelocInfo(rmode); | 304 if (rmode == RelocInfo::CODE_TARGET && id != kNoAstId) { |
| 305 RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, |
| 306 static_cast<intptr_t>(id)); |
| 307 } else if (rmode != RelocInfo::NONE) { |
| 308 RecordRelocInfo(rmode); |
| 309 } |
| 305 emit(x); | 310 emit(x); |
| 306 } | 311 } |
| 307 | 312 |
| 308 | 313 |
| 309 void Assembler::emit(const Immediate& x) { | 314 void Assembler::emit(const Immediate& x) { |
| 310 if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) { | 315 if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) { |
| 311 Label* label = reinterpret_cast<Label*>(x.x_); | 316 Label* label = reinterpret_cast<Label*>(x.x_); |
| 312 emit_code_relative_offset(label); | 317 emit_code_relative_offset(label); |
| 313 return; | 318 return; |
| 314 } | 319 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 415 |
| 411 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 416 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
| 412 // [disp/r] | 417 // [disp/r] |
| 413 set_modrm(0, ebp); | 418 set_modrm(0, ebp); |
| 414 set_dispr(disp, rmode); | 419 set_dispr(disp, rmode); |
| 415 } | 420 } |
| 416 | 421 |
| 417 } } // namespace v8::internal | 422 } } // namespace v8::internal |
| 418 | 423 |
| 419 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 424 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
| OLD | NEW |