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