| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3539 if (key_is_constant) { | 3539 if (key_is_constant) { |
| 3540 __ Addu(scratch, elements, Operand(constant_key * (1 << shift_size) + | 3540 __ Addu(scratch, elements, Operand(constant_key * (1 << shift_size) + |
| 3541 FixedDoubleArray::kHeaderSize - kHeapObjectTag)); | 3541 FixedDoubleArray::kHeaderSize - kHeapObjectTag)); |
| 3542 } else { | 3542 } else { |
| 3543 __ sll(scratch, key, shift_size); | 3543 __ sll(scratch, key, shift_size); |
| 3544 __ Addu(scratch, elements, Operand(scratch)); | 3544 __ Addu(scratch, elements, Operand(scratch)); |
| 3545 __ Addu(scratch, scratch, | 3545 __ Addu(scratch, scratch, |
| 3546 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); | 3546 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); |
| 3547 } | 3547 } |
| 3548 | 3548 |
| 3549 Label is_nan; | 3549 if (instr->NeedsCanonicalization()) { |
| 3550 // Check for NaN. All NaNs must be canonicalized. | 3550 Label is_nan; |
| 3551 __ BranchF(NULL, &is_nan, eq, value, value); | 3551 // Check for NaN. All NaNs must be canonicalized. |
| 3552 __ Branch(¬_nan); | 3552 __ BranchF(NULL, &is_nan, eq, value, value); |
| 3553 __ Branch(¬_nan); |
| 3553 | 3554 |
| 3554 // Only load canonical NaN if the comparison above set the overflow. | 3555 // Only load canonical NaN if the comparison above set the overflow. |
| 3555 __ bind(&is_nan); | 3556 __ bind(&is_nan); |
| 3556 __ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double()); | 3557 __ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double()); |
| 3558 } |
| 3557 | 3559 |
| 3558 __ bind(¬_nan); | 3560 __ bind(¬_nan); |
| 3559 __ sdc1(value, MemOperand(scratch)); | 3561 __ sdc1(value, MemOperand(scratch)); |
| 3560 } | 3562 } |
| 3561 | 3563 |
| 3562 | 3564 |
| 3563 void LCodeGen::DoStoreKeyedSpecializedArrayElement( | 3565 void LCodeGen::DoStoreKeyedSpecializedArrayElement( |
| 3564 LStoreKeyedSpecializedArrayElement* instr) { | 3566 LStoreKeyedSpecializedArrayElement* instr) { |
| 3565 | 3567 |
| 3566 Register external_pointer = ToRegister(instr->external_pointer()); | 3568 Register external_pointer = ToRegister(instr->external_pointer()); |
| (...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5089 __ Subu(scratch, result, scratch); | 5091 __ Subu(scratch, result, scratch); |
| 5090 __ lw(result, FieldMemOperand(scratch, | 5092 __ lw(result, FieldMemOperand(scratch, |
| 5091 FixedArray::kHeaderSize - kPointerSize)); | 5093 FixedArray::kHeaderSize - kPointerSize)); |
| 5092 __ bind(&done); | 5094 __ bind(&done); |
| 5093 } | 5095 } |
| 5094 | 5096 |
| 5095 | 5097 |
| 5096 #undef __ | 5098 #undef __ |
| 5097 | 5099 |
| 5098 } } // namespace v8::internal | 5100 } } // namespace v8::internal |
| OLD | NEW |