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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 case kArmFloat64Min: { | 1245 case kArmFloat64Min: { |
1246 CpuFeatureScope scope(masm(), ARMv8); | 1246 CpuFeatureScope scope(masm(), ARMv8); |
1247 // (a < b) ? a : b | 1247 // (a < b) ? a : b |
1248 DwVfpRegister a = i.InputFloat64Register(0); | 1248 DwVfpRegister a = i.InputFloat64Register(0); |
1249 DwVfpRegister b = i.InputFloat64Register(1); | 1249 DwVfpRegister b = i.InputFloat64Register(1); |
1250 DwVfpRegister result = i.OutputFloat64Register(0); | 1250 DwVfpRegister result = i.OutputFloat64Register(0); |
1251 __ VFPCompareAndSetFlags(b, a); | 1251 __ VFPCompareAndSetFlags(b, a); |
1252 __ vsel(gt, result, a, b); | 1252 __ vsel(gt, result, a, b); |
1253 break; | 1253 break; |
1254 } | 1254 } |
| 1255 case kArmFloat64SilenceNaN: { |
| 1256 DwVfpRegister value = i.InputFloat64Register(0); |
| 1257 DwVfpRegister result = i.OutputFloat64Register(0); |
| 1258 __ VFPCanonicalizeNaN(result, value); |
| 1259 break; |
| 1260 } |
1255 case kArmPush: | 1261 case kArmPush: |
1256 if (instr->InputAt(0)->IsFPRegister()) { | 1262 if (instr->InputAt(0)->IsFPRegister()) { |
1257 LocationOperand* op = LocationOperand::cast(instr->InputAt(0)); | 1263 LocationOperand* op = LocationOperand::cast(instr->InputAt(0)); |
1258 if (op->representation() == MachineRepresentation::kFloat64) { | 1264 if (op->representation() == MachineRepresentation::kFloat64) { |
1259 __ vpush(i.InputFloat64Register(0)); | 1265 __ vpush(i.InputFloat64Register(0)); |
1260 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); | 1266 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
1261 } else { | 1267 } else { |
1262 DCHECK_EQ(MachineRepresentation::kFloat32, op->representation()); | 1268 DCHECK_EQ(MachineRepresentation::kFloat32, op->representation()); |
1263 __ vpush(i.InputFloat32Register(0)); | 1269 __ vpush(i.InputFloat32Register(0)); |
1264 frame_access_state()->IncreaseSPDelta(1); | 1270 frame_access_state()->IncreaseSPDelta(1); |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1798 padding_size -= v8::internal::Assembler::kInstrSize; | 1804 padding_size -= v8::internal::Assembler::kInstrSize; |
1799 } | 1805 } |
1800 } | 1806 } |
1801 } | 1807 } |
1802 | 1808 |
1803 #undef __ | 1809 #undef __ |
1804 | 1810 |
1805 } // namespace compiler | 1811 } // namespace compiler |
1806 } // namespace internal | 1812 } // namespace internal |
1807 } // namespace v8 | 1813 } // namespace v8 |
OLD | NEW |