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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3428 | 3428 |
3429 | 3429 |
3430 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3430 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3431 ZoneList<Expression*>* args = expr->arguments(); | 3431 ZoneList<Expression*>* args = expr->arguments(); |
3432 DCHECK_EQ(3, args->length()); | 3432 DCHECK_EQ(3, args->length()); |
3433 | 3433 |
3434 Register string = v0; | 3434 Register string = v0; |
3435 Register index = a1; | 3435 Register index = a1; |
3436 Register value = a2; | 3436 Register value = a2; |
3437 | 3437 |
3438 VisitForStackValue(args->at(1)); // index | 3438 VisitForStackValue(args->at(0)); // index |
3439 VisitForStackValue(args->at(2)); // value | 3439 VisitForStackValue(args->at(1)); // value |
3440 VisitForAccumulatorValue(args->at(0)); // string | 3440 VisitForAccumulatorValue(args->at(2)); // string |
3441 __ Pop(index, value); | 3441 __ Pop(index, value); |
3442 | 3442 |
3443 if (FLAG_debug_code) { | 3443 if (FLAG_debug_code) { |
3444 __ SmiTst(value, at); | 3444 __ SmiTst(value, at); |
3445 __ Check(eq, kNonSmiValue, at, Operand(zero_reg)); | 3445 __ Check(eq, kNonSmiValue, at, Operand(zero_reg)); |
3446 __ SmiTst(index, at); | 3446 __ SmiTst(index, at); |
3447 __ Check(eq, kNonSmiIndex, at, Operand(zero_reg)); | 3447 __ Check(eq, kNonSmiIndex, at, Operand(zero_reg)); |
3448 __ SmiUntag(index, index); | 3448 __ SmiUntag(index, index); |
3449 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | 3449 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
3450 Register scratch = t1; | 3450 Register scratch = t1; |
(...skipping 14 matching lines...) Expand all Loading... |
3465 | 3465 |
3466 | 3466 |
3467 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { | 3467 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { |
3468 ZoneList<Expression*>* args = expr->arguments(); | 3468 ZoneList<Expression*>* args = expr->arguments(); |
3469 DCHECK_EQ(3, args->length()); | 3469 DCHECK_EQ(3, args->length()); |
3470 | 3470 |
3471 Register string = v0; | 3471 Register string = v0; |
3472 Register index = a1; | 3472 Register index = a1; |
3473 Register value = a2; | 3473 Register value = a2; |
3474 | 3474 |
3475 VisitForStackValue(args->at(1)); // index | 3475 VisitForStackValue(args->at(0)); // index |
3476 VisitForStackValue(args->at(2)); // value | 3476 VisitForStackValue(args->at(1)); // value |
3477 VisitForAccumulatorValue(args->at(0)); // string | 3477 VisitForAccumulatorValue(args->at(2)); // string |
3478 __ Pop(index, value); | 3478 __ Pop(index, value); |
3479 | 3479 |
3480 if (FLAG_debug_code) { | 3480 if (FLAG_debug_code) { |
3481 __ SmiTst(value, at); | 3481 __ SmiTst(value, at); |
3482 __ Check(eq, kNonSmiValue, at, Operand(zero_reg)); | 3482 __ Check(eq, kNonSmiValue, at, Operand(zero_reg)); |
3483 __ SmiTst(index, at); | 3483 __ SmiTst(index, at); |
3484 __ Check(eq, kNonSmiIndex, at, Operand(zero_reg)); | 3484 __ Check(eq, kNonSmiIndex, at, Operand(zero_reg)); |
3485 __ SmiUntag(index, index); | 3485 __ SmiUntag(index, index); |
3486 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | 3486 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
3487 Register scratch = t1; | 3487 Register scratch = t1; |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4877 Assembler::target_address_at(pc_immediate_load_address)) == | 4877 Assembler::target_address_at(pc_immediate_load_address)) == |
4878 reinterpret_cast<uint64_t>( | 4878 reinterpret_cast<uint64_t>( |
4879 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4879 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4880 return OSR_AFTER_STACK_CHECK; | 4880 return OSR_AFTER_STACK_CHECK; |
4881 } | 4881 } |
4882 | 4882 |
4883 | 4883 |
4884 } } // namespace v8::internal | 4884 } } // namespace v8::internal |
4885 | 4885 |
4886 #endif // V8_TARGET_ARCH_MIPS64 | 4886 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |