OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 Label materialized; | 1488 Label materialized; |
1489 // Registers will be used as follows: | 1489 // Registers will be used as follows: |
1490 // a5 = materialized value (RegExp literal) | 1490 // a5 = materialized value (RegExp literal) |
1491 // a4 = JS function, literals array | 1491 // a4 = JS function, literals array |
1492 // a3 = literal index | 1492 // a3 = literal index |
1493 // a2 = RegExp pattern | 1493 // a2 = RegExp pattern |
1494 // a1 = RegExp flags | 1494 // a1 = RegExp flags |
1495 // a0 = RegExp literal clone | 1495 // a0 = RegExp literal clone |
1496 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1496 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1497 __ ld(a4, FieldMemOperand(a0, JSFunction::kLiteralsOffset)); | 1497 __ ld(a4, FieldMemOperand(a0, JSFunction::kLiteralsOffset)); |
1498 int literal_offset = | 1498 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
1499 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; | |
1500 __ ld(a5, FieldMemOperand(a4, literal_offset)); | 1499 __ ld(a5, FieldMemOperand(a4, literal_offset)); |
1501 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 1500 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
1502 __ Branch(&materialized, ne, a5, Operand(at)); | 1501 __ Branch(&materialized, ne, a5, Operand(at)); |
1503 | 1502 |
1504 // Create regexp literal using runtime function. | 1503 // Create regexp literal using runtime function. |
1505 // Result will be in v0. | 1504 // Result will be in v0. |
1506 __ li(a3, Operand(Smi::FromInt(expr->literal_index()))); | 1505 __ li(a3, Operand(Smi::FromInt(expr->literal_index()))); |
1507 __ li(a2, Operand(expr->pattern())); | 1506 __ li(a2, Operand(expr->pattern())); |
1508 __ li(a1, Operand(expr->flags())); | 1507 __ li(a1, Operand(expr->flags())); |
1509 __ Push(a4, a3, a2, a1); | 1508 __ Push(a4, a3, a2, a1); |
(...skipping 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5229 reinterpret_cast<uint64_t>( | 5228 reinterpret_cast<uint64_t>( |
5230 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5229 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5231 return OSR_AFTER_STACK_CHECK; | 5230 return OSR_AFTER_STACK_CHECK; |
5232 } | 5231 } |
5233 | 5232 |
5234 | 5233 |
5235 } // namespace internal | 5234 } // namespace internal |
5236 } // namespace v8 | 5235 } // namespace v8 |
5237 | 5236 |
5238 #endif // V8_TARGET_ARCH_MIPS64 | 5237 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |