| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 | 590 |
| 591 | 591 |
| 592 void Assembler::mov(Register dst, int32_t imm32) { | 592 void Assembler::mov(Register dst, int32_t imm32) { |
| 593 EnsureSpace ensure_space(this); | 593 EnsureSpace ensure_space(this); |
| 594 last_pc_ = pc_; | 594 last_pc_ = pc_; |
| 595 EMIT(0xB8 | dst.code()); | 595 EMIT(0xB8 | dst.code()); |
| 596 emit(imm32); | 596 emit(imm32); |
| 597 } | 597 } |
| 598 | 598 |
| 599 | 599 |
| 600 void Assembler::mov(Register dst, const Immediate& x) { |
| 601 EnsureSpace ensure_space(this); |
| 602 last_pc_ = pc_; |
| 603 EMIT(0xB8 | dst.code()); |
| 604 emit(x); |
| 605 } |
| 606 |
| 607 |
| 600 void Assembler::mov(Register dst, Handle<Object> handle) { | 608 void Assembler::mov(Register dst, Handle<Object> handle) { |
| 601 EnsureSpace ensure_space(this); | 609 EnsureSpace ensure_space(this); |
| 602 last_pc_ = pc_; | 610 last_pc_ = pc_; |
| 603 EMIT(0xB8 | dst.code()); | 611 EMIT(0xB8 | dst.code()); |
| 604 emit(handle); | 612 emit(handle); |
| 605 } | 613 } |
| 606 | 614 |
| 607 | 615 |
| 608 void Assembler::mov(Register dst, const Operand& src) { | 616 void Assembler::mov(Register dst, const Operand& src) { |
| 609 EnsureSpace ensure_space(this); | 617 EnsureSpace ensure_space(this); |
| 610 last_pc_ = pc_; | 618 last_pc_ = pc_; |
| 611 EMIT(0x8B); | 619 EMIT(0x8B); |
| 612 emit_operand(dst, src); | 620 emit_operand(dst, src); |
| 613 } | 621 } |
| 614 | 622 |
| 615 | 623 |
| 624 void Assembler::mov(Register dst, Register src) { |
| 625 EnsureSpace ensure_space(this); |
| 626 last_pc_ = pc_; |
| 627 EMIT(0x89); |
| 628 EMIT(0xC0 | src.code() << 3 | dst.code()); |
| 629 } |
| 630 |
| 631 |
| 616 void Assembler::mov(const Operand& dst, const Immediate& x) { | 632 void Assembler::mov(const Operand& dst, const Immediate& x) { |
| 617 EnsureSpace ensure_space(this); | 633 EnsureSpace ensure_space(this); |
| 618 last_pc_ = pc_; | 634 last_pc_ = pc_; |
| 619 EMIT(0xC7); | 635 EMIT(0xC7); |
| 620 emit_operand(eax, dst); | 636 emit_operand(eax, dst); |
| 621 emit(x); | 637 emit(x); |
| 622 } | 638 } |
| 623 | 639 |
| 624 | 640 |
| 625 void Assembler::mov(const Operand& dst, Handle<Object> handle) { | 641 void Assembler::mov(const Operand& dst, Handle<Object> handle) { |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2048 ASSERT(bound_label.is_bound()); | 2064 ASSERT(bound_label.is_bound()); |
| 2049 ASSERT(0 <= position); | 2065 ASSERT(0 <= position); |
| 2050 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); | 2066 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); |
| 2051 ASSERT(long_at(position) == 0); // only initialize once! | 2067 ASSERT(long_at(position) == 0); // only initialize once! |
| 2052 | 2068 |
| 2053 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); | 2069 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); |
| 2054 long_at_put(position, label_loc); | 2070 long_at_put(position, label_loc); |
| 2055 } | 2071 } |
| 2056 | 2072 |
| 2057 } } // namespace v8::internal | 2073 } } // namespace v8::internal |
| OLD | NEW |