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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 int32_t pos; | 389 int32_t pos; |
390 pos = label->pos() + Code::kHeaderSize - kHeapObjectTag; | 390 pos = label->pos() + Code::kHeaderSize - kHeapObjectTag; |
391 emit(pos); | 391 emit(pos); |
392 } else { | 392 } else { |
393 emit_disp(label, Displacement::CODE_RELATIVE); | 393 emit_disp(label, Displacement::CODE_RELATIVE); |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 | 397 |
398 void Assembler::emit_w(const Immediate& x) { | 398 void Assembler::emit_w(const Immediate& x) { |
399 ASSERT(x.rmode_ == RelocInfo::NONE32); | 399 ASSERT(RelocInfo::IsNone(x.rmode_)); |
400 uint16_t value = static_cast<uint16_t>(x.x_); | 400 uint16_t value = static_cast<uint16_t>(x.x_); |
401 reinterpret_cast<uint16_t*>(pc_)[0] = value; | 401 reinterpret_cast<uint16_t*>(pc_)[0] = value; |
402 pc_ += sizeof(uint16_t); | 402 pc_ += sizeof(uint16_t); |
403 } | 403 } |
404 | 404 |
405 | 405 |
406 Address Assembler::target_address_at(Address pc) { | 406 Address Assembler::target_address_at(Address pc) { |
407 return pc + sizeof(int32_t) + *reinterpret_cast<int32_t*>(pc); | 407 return pc + sizeof(int32_t) + *reinterpret_cast<int32_t*>(pc); |
408 } | 408 } |
409 | 409 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 495 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
496 // [disp/r] | 496 // [disp/r] |
497 set_modrm(0, ebp); | 497 set_modrm(0, ebp); |
498 set_dispr(disp, rmode); | 498 set_dispr(disp, rmode); |
499 } | 499 } |
500 | 500 |
501 } } // namespace v8::internal | 501 } } // namespace v8::internal |
502 | 502 |
503 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 503 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |