| 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 4169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4180 break; | 4180 break; |
| 4181 } | 4181 } |
| 4182 } | 4182 } |
| 4183 } | 4183 } |
| 4184 | 4184 |
| 4185 | 4185 |
| 4186 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { | 4186 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
| 4187 DoubleRegister value = ToDoubleRegister(instr->value()); | 4187 DoubleRegister value = ToDoubleRegister(instr->value()); |
| 4188 Register elements = ToRegister(instr->elements()); | 4188 Register elements = ToRegister(instr->elements()); |
| 4189 Register scratch = scratch0(); | 4189 Register scratch = scratch0(); |
| 4190 Register scratch_1 = scratch1(); |
| 4190 DoubleRegister double_scratch = double_scratch0(); | 4191 DoubleRegister double_scratch = double_scratch0(); |
| 4191 bool key_is_constant = instr->key()->IsConstantOperand(); | 4192 bool key_is_constant = instr->key()->IsConstantOperand(); |
| 4192 int base_offset = instr->base_offset(); | 4193 int base_offset = instr->base_offset(); |
| 4193 Label not_nan, done; | 4194 Label not_nan, done; |
| 4194 | 4195 |
| 4195 // Calculate the effective address of the slot in the array to store the | 4196 // Calculate the effective address of the slot in the array to store the |
| 4196 // double value. | 4197 // double value. |
| 4197 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); | 4198 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); |
| 4198 if (key_is_constant) { | 4199 if (key_is_constant) { |
| 4199 int constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 4200 int constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4211 } | 4212 } |
| 4212 | 4213 |
| 4213 if (instr->NeedsCanonicalization()) { | 4214 if (instr->NeedsCanonicalization()) { |
| 4214 Label is_nan; | 4215 Label is_nan; |
| 4215 // Check for NaN. All NaNs must be canonicalized. | 4216 // Check for NaN. All NaNs must be canonicalized. |
| 4216 __ BranchF(NULL, &is_nan, eq, value, value); | 4217 __ BranchF(NULL, &is_nan, eq, value, value); |
| 4217 __ Branch(¬_nan); | 4218 __ Branch(¬_nan); |
| 4218 | 4219 |
| 4219 // Only load canonical NaN if the comparison above set the overflow. | 4220 // Only load canonical NaN if the comparison above set the overflow. |
| 4220 __ bind(&is_nan); | 4221 __ bind(&is_nan); |
| 4221 __ LoadRoot(at, Heap::kNanValueRootIndex); | 4222 __ LoadRoot(scratch_1, Heap::kNanValueRootIndex); |
| 4222 __ ldc1(double_scratch, FieldMemOperand(at, HeapNumber::kValueOffset)); | 4223 __ ldc1(double_scratch, |
| 4224 FieldMemOperand(scratch_1, HeapNumber::kValueOffset)); |
| 4223 __ sdc1(double_scratch, MemOperand(scratch, 0)); | 4225 __ sdc1(double_scratch, MemOperand(scratch, 0)); |
| 4224 __ Branch(&done); | 4226 __ Branch(&done); |
| 4225 } | 4227 } |
| 4226 | 4228 |
| 4227 __ bind(¬_nan); | 4229 __ bind(¬_nan); |
| 4228 __ sdc1(value, MemOperand(scratch, 0)); | 4230 __ sdc1(value, MemOperand(scratch, 0)); |
| 4229 __ bind(&done); | 4231 __ bind(&done); |
| 4230 } | 4232 } |
| 4231 | 4233 |
| 4232 | 4234 |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5925 __ Push(at, ToRegister(instr->function())); | 5927 __ Push(at, ToRegister(instr->function())); |
| 5926 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5928 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5927 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5929 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5928 } | 5930 } |
| 5929 | 5931 |
| 5930 | 5932 |
| 5931 #undef __ | 5933 #undef __ |
| 5932 | 5934 |
| 5933 } // namespace internal | 5935 } // namespace internal |
| 5934 } // namespace v8 | 5936 } // namespace v8 |
| OLD | NEW |