| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_CONSTANTS_ARM64_H_ | 5 #ifndef VM_CONSTANTS_ARM64_H_ |
| 6 #define VM_CONSTANTS_ARM64_H_ | 6 #define VM_CONSTANTS_ARM64_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 // Add/sub (extended) when not setting the flags. | 989 // Add/sub (extended) when not setting the flags. |
| 990 // Logical (immediate) when not setting the flags. | 990 // Logical (immediate) when not setting the flags. |
| 991 // Otherwise, R31 is the ZR. | 991 // Otherwise, R31 is the ZR. |
| 992 if (IsAddSubImmOp() || (IsAddSubShiftExtOp() && IsExtend())) { | 992 if (IsAddSubImmOp() || (IsAddSubShiftExtOp() && IsExtend())) { |
| 993 if (HasS()) { | 993 if (HasS()) { |
| 994 return R31IsZR; | 994 return R31IsZR; |
| 995 } else { | 995 } else { |
| 996 return R31IsSP; | 996 return R31IsSP; |
| 997 } | 997 } |
| 998 } | 998 } |
| 999 // TODO(zra): Handle for logical immediate operations. | 999 if (IsLogicalImmOp()) { |
| 1000 const int op = Bits(29, 2); |
| 1001 const bool set_flags = op == 3; |
| 1002 if (set_flags) { |
| 1003 return R31IsZR; |
| 1004 } else { |
| 1005 return R31IsSP; |
| 1006 } |
| 1007 } |
| 1000 return R31IsZR; | 1008 return R31IsZR; |
| 1001 } | 1009 } |
| 1002 | 1010 |
| 1003 // Indicate whether Rn can be CSP or ZR. This does not check that the | 1011 // Indicate whether Rn can be CSP or ZR. This does not check that the |
| 1004 // instruction actually has an Rn field. | 1012 // instruction actually has an Rn field. |
| 1005 R31Type RnMode() const { | 1013 R31Type RnMode() const { |
| 1006 // The following instructions use CSP as Rn: | 1014 // The following instructions use CSP as Rn: |
| 1007 // All loads and stores. | 1015 // All loads and stores. |
| 1008 // Add/sub (immediate). | 1016 // Add/sub (immediate). |
| 1009 // Add/sub (extended). | 1017 // Add/sub (extended). |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 1098 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 1091 | 1099 |
| 1092 private: | 1100 private: |
| 1093 DISALLOW_ALLOCATION(); | 1101 DISALLOW_ALLOCATION(); |
| 1094 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 1102 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 1095 }; | 1103 }; |
| 1096 | 1104 |
| 1097 } // namespace dart | 1105 } // namespace dart |
| 1098 | 1106 |
| 1099 #endif // VM_CONSTANTS_ARM64_H_ | 1107 #endif // VM_CONSTANTS_ARM64_H_ |
| OLD | NEW |