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 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 __ JumpIfNotSmi(a1, &runtime); | 1469 __ JumpIfNotSmi(a1, &runtime); |
1470 __ ld(a3, FieldMemOperand(a3, String::kLengthOffset)); | 1470 __ ld(a3, FieldMemOperand(a3, String::kLengthOffset)); |
1471 __ Branch(&runtime, ls, a3, Operand(a1)); | 1471 __ Branch(&runtime, ls, a3, Operand(a1)); |
1472 __ SmiUntag(a1); | 1472 __ SmiUntag(a1); |
1473 | 1473 |
1474 STATIC_ASSERT(kStringEncodingMask == 8); | 1474 STATIC_ASSERT(kStringEncodingMask == 8); |
1475 STATIC_ASSERT(kOneByteStringTag == 8); | 1475 STATIC_ASSERT(kOneByteStringTag == 8); |
1476 STATIC_ASSERT(kTwoByteStringTag == 0); | 1476 STATIC_ASSERT(kTwoByteStringTag == 0); |
1477 __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for one_byte. | 1477 __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for one_byte. |
1478 __ ld(t9, FieldMemOperand(regexp_data, JSRegExp::kDataOneByteCodeOffset)); | 1478 __ ld(t9, FieldMemOperand(regexp_data, JSRegExp::kDataOneByteCodeOffset)); |
1479 __ dsra(a3, a0, 2); // a3 is 1 for one_byte, 0 for UC16 (used below). | 1479 __ dsra(a3, a0, 3); // a3 is 1 for one_byte, 0 for UC16 (used below). |
1480 __ ld(a5, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset)); | 1480 __ ld(a5, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset)); |
1481 __ Movz(t9, a5, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset. | 1481 __ Movz(t9, a5, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset. |
1482 | 1482 |
1483 // (E) Carry on. String handling is done. | 1483 // (E) Carry on. String handling is done. |
1484 // t9: irregexp code | 1484 // t9: irregexp code |
1485 // Check that the irregexp code has been generated for the actual string | 1485 // Check that the irregexp code has been generated for the actual string |
1486 // encoding. If it has, the field contains a code object otherwise it contains | 1486 // encoding. If it has, the field contains a code object otherwise it contains |
1487 // a smi (code flushing support). | 1487 // a smi (code flushing support). |
1488 __ JumpIfSmi(t9, &runtime); | 1488 __ JumpIfSmi(t9, &runtime); |
1489 | 1489 |
(...skipping 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4318 kStackUnwindSpace, kInvalidStackOffset, | 4318 kStackUnwindSpace, kInvalidStackOffset, |
4319 return_value_operand, NULL); | 4319 return_value_operand, NULL); |
4320 } | 4320 } |
4321 | 4321 |
4322 #undef __ | 4322 #undef __ |
4323 | 4323 |
4324 } // namespace internal | 4324 } // namespace internal |
4325 } // namespace v8 | 4325 } // namespace v8 |
4326 | 4326 |
4327 #endif // V8_TARGET_ARCH_MIPS64 | 4327 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |