OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 case kArmFloat64Min: { | 1224 case kArmFloat64Min: { |
1225 CpuFeatureScope scope(masm(), ARMv8); | 1225 CpuFeatureScope scope(masm(), ARMv8); |
1226 // (a < b) ? a : b | 1226 // (a < b) ? a : b |
1227 DwVfpRegister a = i.InputFloat64Register(0); | 1227 DwVfpRegister a = i.InputFloat64Register(0); |
1228 DwVfpRegister b = i.InputFloat64Register(1); | 1228 DwVfpRegister b = i.InputFloat64Register(1); |
1229 DwVfpRegister result = i.OutputFloat64Register(0); | 1229 DwVfpRegister result = i.OutputFloat64Register(0); |
1230 __ VFPCompareAndSetFlags(b, a); | 1230 __ VFPCompareAndSetFlags(b, a); |
1231 __ vsel(gt, result, a, b); | 1231 __ vsel(gt, result, a, b); |
1232 break; | 1232 break; |
1233 } | 1233 } |
| 1234 case kArmFloat64SilenceNaN: { |
| 1235 DwVfpRegister value = i.InputFloat64Register(0); |
| 1236 DwVfpRegister result = i.OutputFloat64Register(0); |
| 1237 __ VFPCanonicalizeNaN(result, value); |
| 1238 break; |
| 1239 } |
1234 case kArmPush: | 1240 case kArmPush: |
1235 if (instr->InputAt(0)->IsFPRegister()) { | 1241 if (instr->InputAt(0)->IsFPRegister()) { |
1236 LocationOperand* op = LocationOperand::cast(instr->InputAt(0)); | 1242 LocationOperand* op = LocationOperand::cast(instr->InputAt(0)); |
1237 if (op->representation() == MachineRepresentation::kFloat64) { | 1243 if (op->representation() == MachineRepresentation::kFloat64) { |
1238 __ vpush(i.InputFloat64Register(0)); | 1244 __ vpush(i.InputFloat64Register(0)); |
1239 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); | 1245 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
1240 } else { | 1246 } else { |
1241 DCHECK_EQ(MachineRepresentation::kFloat32, op->representation()); | 1247 DCHECK_EQ(MachineRepresentation::kFloat32, op->representation()); |
1242 __ vpush(i.InputFloat32Register(0)); | 1248 __ vpush(i.InputFloat32Register(0)); |
1243 frame_access_state()->IncreaseSPDelta(1); | 1249 frame_access_state()->IncreaseSPDelta(1); |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 padding_size -= v8::internal::Assembler::kInstrSize; | 1783 padding_size -= v8::internal::Assembler::kInstrSize; |
1778 } | 1784 } |
1779 } | 1785 } |
1780 } | 1786 } |
1781 | 1787 |
1782 #undef __ | 1788 #undef __ |
1783 | 1789 |
1784 } // namespace compiler | 1790 } // namespace compiler |
1785 } // namespace internal | 1791 } // namespace internal |
1786 } // namespace v8 | 1792 } // namespace v8 |
OLD | NEW |