| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
| (...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3117 } | 3117 } |
| 3118 | 3118 |
| 3119 | 3119 |
| 3120 void Assembler::RecordConstPool(int size) { | 3120 void Assembler::RecordConstPool(int size) { |
| 3121 // We only need this for debugger support, to correctly compute offsets in the | 3121 // We only need this for debugger support, to correctly compute offsets in the |
| 3122 // code. | 3122 // code. |
| 3123 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 3123 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
| 3124 } | 3124 } |
| 3125 | 3125 |
| 3126 | 3126 |
| 3127 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { | |
| 3128 // No out-of-line constant pool support. | |
| 3129 DCHECK(!FLAG_enable_ool_constant_pool); | |
| 3130 return isolate->factory()->empty_constant_pool_array(); | |
| 3131 } | |
| 3132 | |
| 3133 | |
| 3134 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { | |
| 3135 // No out-of-line constant pool support. | |
| 3136 DCHECK(!FLAG_enable_ool_constant_pool); | |
| 3137 return; | |
| 3138 } | |
| 3139 | |
| 3140 | |
| 3141 void PatchingAssembler::PatchAdrFar(int64_t target_offset) { | 3127 void PatchingAssembler::PatchAdrFar(int64_t target_offset) { |
| 3142 // The code at the current instruction should be: | 3128 // The code at the current instruction should be: |
| 3143 // adr rd, 0 | 3129 // adr rd, 0 |
| 3144 // nop (adr_far) | 3130 // nop (adr_far) |
| 3145 // nop (adr_far) | 3131 // nop (adr_far) |
| 3146 // movz scratch, 0 | 3132 // movz scratch, 0 |
| 3147 | 3133 |
| 3148 // Verify the expected code. | 3134 // Verify the expected code. |
| 3149 Instruction* expected_adr = InstructionAt(0); | 3135 Instruction* expected_adr = InstructionAt(0); |
| 3150 CHECK(expected_adr->IsAdr() && (expected_adr->ImmPCRel() == 0)); | 3136 CHECK(expected_adr->IsAdr() && (expected_adr->ImmPCRel() == 0)); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3167 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); | 3153 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); |
| 3168 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3154 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3169 DCHECK((target_offset >> 48) == 0); | 3155 DCHECK((target_offset >> 48) == 0); |
| 3170 add(rd, rd, scratch); | 3156 add(rd, rd, scratch); |
| 3171 } | 3157 } |
| 3172 | 3158 |
| 3173 | 3159 |
| 3174 } } // namespace v8::internal | 3160 } } // namespace v8::internal |
| 3175 | 3161 |
| 3176 #endif // V8_TARGET_ARCH_ARM64 | 3162 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |