OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4714 __ addu(a0, a0, a2); | 4714 __ addu(a0, a0, a2); |
4715 __ sw(a0, MemOperand(sp, 2 * kPointerSize)); | 4715 __ sw(a0, MemOperand(sp, 2 * kPointerSize)); |
4716 | 4716 |
4717 // Argument 5: static offsets vector buffer. | 4717 // Argument 5: static offsets vector buffer. |
4718 __ li(a0, Operand( | 4718 __ li(a0, Operand( |
4719 ExternalReference::address_of_static_offsets_vector(masm->isolate()))); | 4719 ExternalReference::address_of_static_offsets_vector(masm->isolate()))); |
4720 __ sw(a0, MemOperand(sp, 1 * kPointerSize)); | 4720 __ sw(a0, MemOperand(sp, 1 * kPointerSize)); |
4721 | 4721 |
4722 // For arguments 4 and 3 get string length, calculate start of string data | 4722 // For arguments 4 and 3 get string length, calculate start of string data |
4723 // and calculate the shift of the index (0 for ASCII and 1 for two byte). | 4723 // and calculate the shift of the index (0 for ASCII and 1 for two byte). |
4724 STATIC_ASSERT(SeqAsciiString::kHeaderSize == SeqTwoByteString::kHeaderSize); | 4724 __ Addu(t2, subject, Operand(SeqString::kHeaderSize - kHeapObjectTag)); |
4725 __ Addu(t2, subject, Operand(SeqAsciiString::kHeaderSize - kHeapObjectTag)); | |
4726 __ Xor(a3, a3, Operand(1)); // 1 for 2-byte str, 0 for 1-byte. | 4725 __ Xor(a3, a3, Operand(1)); // 1 for 2-byte str, 0 for 1-byte. |
4727 // Load the length from the original subject string from the previous stack | 4726 // Load the length from the original subject string from the previous stack |
4728 // frame. Therefore we have to use fp, which points exactly to two pointer | 4727 // frame. Therefore we have to use fp, which points exactly to two pointer |
4729 // sizes below the previous sp. (Because creating a new stack frame pushes | 4728 // sizes below the previous sp. (Because creating a new stack frame pushes |
4730 // the previous fp onto the stack and moves up sp by 2 * kPointerSize.) | 4729 // the previous fp onto the stack and moves up sp by 2 * kPointerSize.) |
4731 __ lw(subject, MemOperand(fp, kSubjectOffset + 2 * kPointerSize)); | 4730 __ lw(subject, MemOperand(fp, kSubjectOffset + 2 * kPointerSize)); |
4732 // If slice offset is not 0, load the length from the original sliced string. | 4731 // If slice offset is not 0, load the length from the original sliced string. |
4733 // Argument 4, a3: End of string data | 4732 // Argument 4, a3: End of string data |
4734 // Argument 3, a2: Start of string data | 4733 // Argument 3, a2: Start of string data |
4735 // Prepare start and end index of the input. | 4734 // Prepare start and end index of the input. |
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7021 __ mov(result, zero_reg); | 7020 __ mov(result, zero_reg); |
7022 __ Ret(); | 7021 __ Ret(); |
7023 } | 7022 } |
7024 | 7023 |
7025 | 7024 |
7026 #undef __ | 7025 #undef __ |
7027 | 7026 |
7028 } } // namespace v8::internal | 7027 } } // namespace v8::internal |
7029 | 7028 |
7030 #endif // V8_TARGET_ARCH_MIPS | 7029 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |