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/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 __ Fccmp(i.InputDoubleRegister(0), i.InputDoubleRegister(0), VFlag, vc); | 1063 __ Fccmp(i.InputDoubleRegister(0), i.InputDoubleRegister(0), VFlag, vc); |
1064 __ B(vc, &done); | 1064 __ B(vc, &done); |
1065 __ Fcmp(i.InputDoubleRegister(0), static_cast<double>(INT64_MIN)); | 1065 __ Fcmp(i.InputDoubleRegister(0), static_cast<double>(INT64_MIN)); |
1066 __ Cset(i.OutputRegister(1), eq); | 1066 __ Cset(i.OutputRegister(1), eq); |
1067 __ Bind(&done); | 1067 __ Bind(&done); |
1068 } | 1068 } |
1069 break; | 1069 break; |
1070 case kArm64Float32ToUint64: | 1070 case kArm64Float32ToUint64: |
1071 __ Fcvtzu(i.OutputRegister64(), i.InputFloat32Register(0)); | 1071 __ Fcvtzu(i.OutputRegister64(), i.InputFloat32Register(0)); |
1072 if (i.OutputCount() > 1) { | 1072 if (i.OutputCount() > 1) { |
1073 __ Fcmp(i.InputFloat32Register(0), 0.0); | 1073 __ Fcmp(i.InputFloat32Register(0), -1.0); |
1074 __ Ccmp(i.OutputRegister(0), -1, ZFlag, ge); | 1074 __ Ccmp(i.OutputRegister(0), -1, ZFlag, gt); |
1075 __ Cset(i.OutputRegister(1), ne); | 1075 __ Cset(i.OutputRegister(1), ne); |
1076 } | 1076 } |
1077 break; | 1077 break; |
1078 case kArm64Float64ToUint64: | 1078 case kArm64Float64ToUint64: |
1079 __ Fcvtzu(i.OutputRegister64(), i.InputDoubleRegister(0)); | 1079 __ Fcvtzu(i.OutputRegister64(), i.InputDoubleRegister(0)); |
1080 if (i.OutputCount() > 1) { | 1080 if (i.OutputCount() > 1) { |
1081 __ Fcmp(i.InputDoubleRegister(0), 0.0); | 1081 __ Fcmp(i.InputDoubleRegister(0), -1.0); |
1082 __ Ccmp(i.OutputRegister(0), -1, ZFlag, ge); | 1082 __ Ccmp(i.OutputRegister(0), -1, ZFlag, gt); |
1083 __ Cset(i.OutputRegister(1), ne); | 1083 __ Cset(i.OutputRegister(1), ne); |
1084 } | 1084 } |
1085 break; | 1085 break; |
1086 case kArm64Int32ToFloat64: | 1086 case kArm64Int32ToFloat64: |
1087 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); | 1087 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); |
1088 break; | 1088 break; |
1089 case kArm64Int64ToFloat32: | 1089 case kArm64Int64ToFloat32: |
1090 __ Scvtf(i.OutputDoubleRegister().S(), i.InputRegister64(0)); | 1090 __ Scvtf(i.OutputDoubleRegister().S(), i.InputRegister64(0)); |
1091 break; | 1091 break; |
1092 case kArm64Int64ToFloat64: | 1092 case kArm64Int64ToFloat64: |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 padding_size -= kInstructionSize; | 1631 padding_size -= kInstructionSize; |
1632 } | 1632 } |
1633 } | 1633 } |
1634 } | 1634 } |
1635 | 1635 |
1636 #undef __ | 1636 #undef __ |
1637 | 1637 |
1638 } // namespace compiler | 1638 } // namespace compiler |
1639 } // namespace internal | 1639 } // namespace internal |
1640 } // namespace v8 | 1640 } // namespace v8 |
OLD | NEW |