OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 4175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4186 break; | 4186 break; |
4187 } | 4187 } |
4188 } | 4188 } |
4189 } | 4189 } |
4190 | 4190 |
4191 | 4191 |
4192 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { | 4192 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
4193 DoubleRegister value = ToDoubleRegister(instr->value()); | 4193 DoubleRegister value = ToDoubleRegister(instr->value()); |
4194 Register elements = ToRegister(instr->elements()); | 4194 Register elements = ToRegister(instr->elements()); |
4195 Register scratch = scratch0(); | 4195 Register scratch = scratch0(); |
| 4196 Register scratch_1 = scratch1(); |
4196 DoubleRegister double_scratch = double_scratch0(); | 4197 DoubleRegister double_scratch = double_scratch0(); |
4197 bool key_is_constant = instr->key()->IsConstantOperand(); | 4198 bool key_is_constant = instr->key()->IsConstantOperand(); |
4198 int base_offset = instr->base_offset(); | 4199 int base_offset = instr->base_offset(); |
4199 Label not_nan, done; | 4200 Label not_nan, done; |
4200 | 4201 |
4201 // Calculate the effective address of the slot in the array to store the | 4202 // Calculate the effective address of the slot in the array to store the |
4202 // double value. | 4203 // double value. |
4203 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); | 4204 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); |
4204 if (key_is_constant) { | 4205 if (key_is_constant) { |
4205 int constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 4206 int constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
(...skipping 11 matching lines...) Expand all Loading... |
4217 } | 4218 } |
4218 | 4219 |
4219 if (instr->NeedsCanonicalization()) { | 4220 if (instr->NeedsCanonicalization()) { |
4220 Label is_nan; | 4221 Label is_nan; |
4221 // Check for NaN. All NaNs must be canonicalized. | 4222 // Check for NaN. All NaNs must be canonicalized. |
4222 __ BranchF(NULL, &is_nan, eq, value, value); | 4223 __ BranchF(NULL, &is_nan, eq, value, value); |
4223 __ Branch(¬_nan); | 4224 __ Branch(¬_nan); |
4224 | 4225 |
4225 // Only load canonical NaN if the comparison above set the overflow. | 4226 // Only load canonical NaN if the comparison above set the overflow. |
4226 __ bind(&is_nan); | 4227 __ bind(&is_nan); |
4227 __ LoadRoot(at, Heap::kNanValueRootIndex); | 4228 __ LoadRoot(scratch_1, Heap::kNanValueRootIndex); |
4228 __ ldc1(double_scratch, FieldMemOperand(at, HeapNumber::kValueOffset)); | 4229 __ ldc1(double_scratch, |
| 4230 FieldMemOperand(scratch_1, HeapNumber::kValueOffset)); |
4229 __ sdc1(double_scratch, MemOperand(scratch, 0)); | 4231 __ sdc1(double_scratch, MemOperand(scratch, 0)); |
4230 __ Branch(&done); | 4232 __ Branch(&done); |
4231 } | 4233 } |
4232 | 4234 |
4233 __ bind(¬_nan); | 4235 __ bind(¬_nan); |
4234 __ sdc1(value, MemOperand(scratch, 0)); | 4236 __ sdc1(value, MemOperand(scratch, 0)); |
4235 __ bind(&done); | 4237 __ bind(&done); |
4236 } | 4238 } |
4237 | 4239 |
4238 | 4240 |
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5929 __ Push(at, ToRegister(instr->function())); | 5931 __ Push(at, ToRegister(instr->function())); |
5930 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5932 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5931 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5933 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5932 } | 5934 } |
5933 | 5935 |
5934 | 5936 |
5935 #undef __ | 5937 #undef __ |
5936 | 5938 |
5937 } // namespace internal | 5939 } // namespace internal |
5938 } // namespace v8 | 5940 } // namespace v8 |
OLD | NEW |