| 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 3667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3678 ConstantPoolArray::Type type = GetConstantPoolType(rmode); | 3678 ConstantPoolArray::Type type = GetConstantPoolType(rmode); |
| 3679 | 3679 |
| 3680 // Update constant pool if necessary and get the entry's offset. | 3680 // Update constant pool if necessary and get the entry's offset. |
| 3681 int offset; | 3681 int offset; |
| 3682 if (entry->merged_index_ == -1) { | 3682 if (entry->merged_index_ == -1) { |
| 3683 offset = offsets[entry->section_][type]; | 3683 offset = offsets[entry->section_][type]; |
| 3684 offsets[entry->section_][type] += ConstantPoolArray::entry_size(type); | 3684 offsets[entry->section_][type] += ConstantPoolArray::entry_size(type); |
| 3685 if (type == ConstantPoolArray::INT64) { | 3685 if (type == ConstantPoolArray::INT64) { |
| 3686 constant_pool->set_at_offset(offset, rinfo.data64()); | 3686 constant_pool->set_at_offset(offset, rinfo.data64()); |
| 3687 } else if (type == ConstantPoolArray::INT32) { | 3687 } else if (type == ConstantPoolArray::INT32) { |
| 3688 constant_pool->set_at_offset(offset, rinfo.data()); | 3688 constant_pool->set_at_offset(offset, |
| 3689 static_cast<int32_t>(rinfo.data())); |
| 3689 } else if (type == ConstantPoolArray::CODE_PTR) { | 3690 } else if (type == ConstantPoolArray::CODE_PTR) { |
| 3690 constant_pool->set_at_offset(offset, | 3691 constant_pool->set_at_offset(offset, |
| 3691 reinterpret_cast<Address>(rinfo.data())); | 3692 reinterpret_cast<Address>(rinfo.data())); |
| 3692 } else { | 3693 } else { |
| 3693 ASSERT(type == ConstantPoolArray::HEAP_PTR); | 3694 ASSERT(type == ConstantPoolArray::HEAP_PTR); |
| 3694 constant_pool->set_at_offset(offset, | 3695 constant_pool->set_at_offset(offset, |
| 3695 reinterpret_cast<Object*>(rinfo.data())); | 3696 reinterpret_cast<Object*>(rinfo.data())); |
| 3696 } | 3697 } |
| 3697 offset -= kHeapObjectTag; | 3698 offset -= kHeapObjectTag; |
| 3698 entry->merged_index_ = offset; // Stash offset for merged entries. | 3699 entry->merged_index_ = offset; // Stash offset for merged entries. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3730 assm->instr_at_put( | 3731 assm->instr_at_put( |
| 3731 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); | 3732 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); |
| 3732 } | 3733 } |
| 3733 } | 3734 } |
| 3734 } | 3735 } |
| 3735 | 3736 |
| 3736 | 3737 |
| 3737 } } // namespace v8::internal | 3738 } } // namespace v8::internal |
| 3738 | 3739 |
| 3739 #endif // V8_TARGET_ARCH_ARM | 3740 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |