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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1038 case kArm64Float64ToUint32: | 1038 case kArm64Float64ToUint32: |
1039 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0)); | 1039 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0)); |
1040 break; | 1040 break; |
1041 case kArm64Float32ToInt64: | 1041 case kArm64Float32ToInt64: |
1042 __ Fcvtzs(i.OutputRegister64(), i.InputFloat32Register(0)); | 1042 __ Fcvtzs(i.OutputRegister64(), i.InputFloat32Register(0)); |
1043 if (i.OutputCount() > 1) { | 1043 if (i.OutputCount() > 1) { |
1044 __ Cmp(i.OutputRegister(0), 1); | 1044 __ Cmp(i.OutputRegister(0), 1); |
1045 __ Ccmp(i.OutputRegister(0), -1, VFlag, vc); | 1045 __ Ccmp(i.OutputRegister(0), -1, VFlag, vc); |
1046 __ Fccmp(i.InputFloat32Register(0), i.InputFloat32Register(0), VFlag, | 1046 __ Fccmp(i.InputFloat32Register(0), i.InputFloat32Register(0), VFlag, |
1047 vc); | 1047 vc); |
1048 __ Cset(i.OutputRegister(1), vc); | 1048 __ Cset(i.OutputRegister(1), vc); |
jbramley
2015/12/16 12:47:01
This can now be a simple "__ Mov(i.OutputRegister(
ahaas
2015/12/16 14:35:23
Done.
| |
1049 Label done; | |
1050 __ B(vc, &done); | |
1051 __ Fcmp(i.InputFloat32Register(0), -9223372036854775808.0f); | |
jbramley
2015/12/16 12:47:01
Consider using "static_cast<float>(-INT64_MIN)" he
Michael Starzinger
2015/12/16 13:01:29
+1, magic number is being magic, please use a name
ahaas
2015/12/16 14:35:23
Done.
| |
1052 __ Cset(i.OutputRegister(1), eq); | |
1053 __ Bind(&done); | |
1049 } | 1054 } |
1050 break; | 1055 break; |
1051 case kArm64Float64ToInt64: | 1056 case kArm64Float64ToInt64: |
1052 __ Fcvtzs(i.OutputRegister(0), i.InputDoubleRegister(0)); | 1057 __ Fcvtzs(i.OutputRegister(0), i.InputDoubleRegister(0)); |
1053 if (i.OutputCount() > 1) { | 1058 if (i.OutputCount() > 1) { |
1054 __ Cmp(i.OutputRegister(0), 1); | 1059 __ Cmp(i.OutputRegister(0), 1); |
1055 __ Ccmp(i.OutputRegister(0), -1, VFlag, vc); | 1060 __ Ccmp(i.OutputRegister(0), -1, VFlag, vc); |
1056 __ Fccmp(i.InputDoubleRegister(0), i.InputDoubleRegister(0), VFlag, vc); | 1061 __ Fccmp(i.InputDoubleRegister(0), i.InputDoubleRegister(0), VFlag, vc); |
1057 __ Cset(i.OutputRegister(1), vc); | 1062 __ Cset(i.OutputRegister(1), vc); |
1063 Label done; | |
1064 __ B(vc, &done); | |
1065 __ Fcmp(i.InputDoubleRegister(0), -9223372036854775808.0f); | |
jbramley
2015/12/16 12:47:01
Ditto. (Otherwise, remove the "f" since this is a
Michael Starzinger
2015/12/16 13:01:29
+1
ahaas
2015/12/16 14:35:23
Done.
| |
1066 __ Cset(i.OutputRegister(1), eq); | |
1067 __ Bind(&done); | |
1058 } | 1068 } |
1059 break; | 1069 break; |
1060 case kArm64Float32ToUint64: | 1070 case kArm64Float32ToUint64: |
1061 __ Fcvtzu(i.OutputRegister64(), i.InputFloat32Register(0)); | 1071 __ Fcvtzu(i.OutputRegister64(), i.InputFloat32Register(0)); |
1062 if (i.OutputCount() > 1) { | 1072 if (i.OutputCount() > 1) { |
1063 __ Fcmp(i.InputFloat32Register(0), 0.0); | 1073 __ Fcmp(i.InputFloat32Register(0), 0.0); |
1064 __ Ccmp(i.OutputRegister(0), -1, ZFlag, ge); | 1074 __ Ccmp(i.OutputRegister(0), -1, ZFlag, ge); |
1065 __ Cset(i.OutputRegister(1), ne); | 1075 __ Cset(i.OutputRegister(1), ne); |
1066 } | 1076 } |
1067 break; | 1077 break; |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1621 padding_size -= kInstructionSize; | 1631 padding_size -= kInstructionSize; |
1622 } | 1632 } |
1623 } | 1633 } |
1624 } | 1634 } |
1625 | 1635 |
1626 #undef __ | 1636 #undef __ |
1627 | 1637 |
1628 } // namespace compiler | 1638 } // namespace compiler |
1629 } // namespace internal | 1639 } // namespace internal |
1630 } // namespace v8 | 1640 } // namespace v8 |
OLD | NEW |