OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4428 Bind(&loop_again); | 4428 Bind(&loop_again); |
4429 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); | 4429 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); |
4430 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); | 4430 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); |
4431 DecodeField<Map::ElementsKindBits>(scratch1); | 4431 DecodeField<Map::ElementsKindBits>(scratch1); |
4432 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found); | 4432 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found); |
4433 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); | 4433 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); |
4434 CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again); | 4434 CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again); |
4435 } | 4435 } |
4436 | 4436 |
4437 | 4437 |
| 4438 void MacroAssembler::AdaptUnoptimizedFrameForOsrEntry( |
| 4439 int unoptimized_slot_count, Register scratch0, Register scratch1) { |
| 4440 DCHECK(jssp.Is(__ StackPointer())); |
| 4441 if (unoptimized_slot_count > 0) { |
| 4442 Label loop_start; |
| 4443 Add(scratch0, fp, JavaScriptFrameConstants::kFeedbackVectorOffset); |
| 4444 bind(&loop_start); |
| 4445 Ldr(scratch1, MemOperand(scratch0, -1 * kPointerSize)); |
| 4446 Str(scratch1, MemOperand(scratch0, 0)); |
| 4447 Sub(scratch0, scratch0, kPointerSize); |
| 4448 Cmp(scratch0, jssp); |
| 4449 B(gt, &loop_start); |
| 4450 } |
| 4451 Add(jssp, jssp, kPointerSize); |
| 4452 } |
| 4453 |
| 4454 |
4438 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, | 4455 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, |
4439 Register result) { | 4456 Register result) { |
4440 DCHECK(!result.Is(ldr_location)); | 4457 DCHECK(!result.Is(ldr_location)); |
4441 const uint32_t kLdrLitOffset_lsb = 5; | 4458 const uint32_t kLdrLitOffset_lsb = 5; |
4442 const uint32_t kLdrLitOffset_width = 19; | 4459 const uint32_t kLdrLitOffset_width = 19; |
4443 Ldr(result, MemOperand(ldr_location)); | 4460 Ldr(result, MemOperand(ldr_location)); |
4444 if (emit_debug_code()) { | 4461 if (emit_debug_code()) { |
4445 And(result, result, LoadLiteralFMask); | 4462 And(result, result, LoadLiteralFMask); |
4446 Cmp(result, LoadLiteralFixed); | 4463 Cmp(result, LoadLiteralFixed); |
4447 Check(eq, kTheInstructionToPatchShouldBeAnLdrLiteral); | 4464 Check(eq, kTheInstructionToPatchShouldBeAnLdrLiteral); |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5146 } | 5163 } |
5147 } | 5164 } |
5148 | 5165 |
5149 | 5166 |
5150 #undef __ | 5167 #undef __ |
5151 | 5168 |
5152 | 5169 |
5153 } } // namespace v8::internal | 5170 } } // namespace v8::internal |
5154 | 5171 |
5155 #endif // V8_TARGET_ARCH_ARM64 | 5172 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |