| 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 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
| 6 | 6 |
| 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 8 #if defined(TARGET_ARCH_ARM64) | 8 #if defined(TARGET_ARCH_ARM64) |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 | 10 |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 | 894 |
| 895 | 895 |
| 896 void ARM64Decoder::DecodeMiscDP3Source(Instr* instr) { | 896 void ARM64Decoder::DecodeMiscDP3Source(Instr* instr) { |
| 897 if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 0) && | 897 if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 0) && |
| 898 (instr->Bit(15) == 0)) { | 898 (instr->Bit(15) == 0)) { |
| 899 if (instr->RaField() == R31) { | 899 if (instr->RaField() == R31) { |
| 900 Format(instr, "mul'sf, 'rd, 'rn, 'rm"); | 900 Format(instr, "mul'sf, 'rd, 'rn, 'rm"); |
| 901 } else { | 901 } else { |
| 902 Format(instr, "madd'sf 'rd, 'rn, 'rm, 'ra"); | 902 Format(instr, "madd'sf 'rd, 'rn, 'rm, 'ra"); |
| 903 } | 903 } |
| 904 } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 0) && |
| 905 (instr->Bit(15) == 1)) { |
| 906 Format(instr, "msub'sf 'rd, 'rn, 'rm, 'ra"); |
| 907 } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 2) && |
| 908 (instr->Bit(15) == 0)) { |
| 909 Format(instr, "smulh 'rd, 'rn, 'rm"); |
| 904 } else { | 910 } else { |
| 905 Unknown(instr); | 911 Unknown(instr); |
| 906 } | 912 } |
| 907 } | 913 } |
| 908 | 914 |
| 909 | 915 |
| 910 void ARM64Decoder::DecodeConditionalSelect(Instr* instr) { | 916 void ARM64Decoder::DecodeConditionalSelect(Instr* instr) { |
| 911 if ((instr->Bits(29, 2) == 0) && (instr->Bits(10, 2) == 0)) { | 917 if ((instr->Bits(29, 2) == 0) && (instr->Bits(10, 2) == 0)) { |
| 912 Format(instr, "mov'sf'cond 'rd, 'rn, 'rm"); | 918 Format(instr, "mov'sf'cond 'rd, 'rn, 'rm"); |
| 913 } else { | 919 } else { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 if (instr->Bits(16, 3) == 6) { | 969 if (instr->Bits(16, 3) == 6) { |
| 964 Format(instr, "fmovrd 'rd, 'vn"); | 970 Format(instr, "fmovrd 'rd, 'vn"); |
| 965 } else if (instr->Bits(16, 3) == 7) { | 971 } else if (instr->Bits(16, 3) == 7) { |
| 966 Format(instr, "fmovdr 'vd, 'rn"); | 972 Format(instr, "fmovdr 'vd, 'rn"); |
| 967 } else { | 973 } else { |
| 968 Unknown(instr); | 974 Unknown(instr); |
| 969 } | 975 } |
| 970 } | 976 } |
| 971 | 977 |
| 972 | 978 |
| 979 void ARM64Decoder::DecodeFPOneSource(Instr* instr) { |
| 980 const int opc = instr->Bits(15, 2); |
| 981 |
| 982 switch (opc) { |
| 983 case 0: |
| 984 Format(instr, "fmovdd 'vd, 'vn"); |
| 985 break; |
| 986 default: |
| 987 Unknown(instr); |
| 988 break; |
| 989 } |
| 990 } |
| 991 |
| 992 |
| 973 void ARM64Decoder::DecodeFP(Instr* instr) { | 993 void ARM64Decoder::DecodeFP(Instr* instr) { |
| 974 if (instr->IsFPImmOp()) { | 994 if (instr->IsFPImmOp()) { |
| 975 DecodeFPImm(instr); | 995 DecodeFPImm(instr); |
| 976 } else if (instr->IsFPIntCvtOp()) { | 996 } else if (instr->IsFPIntCvtOp()) { |
| 977 DecodeFPIntCvt(instr); | 997 DecodeFPIntCvt(instr); |
| 998 } else if (instr->IsFPOneSourceOp()) { |
| 999 DecodeFPOneSource(instr); |
| 978 } else { | 1000 } else { |
| 979 Unknown(instr); | 1001 Unknown(instr); |
| 980 } | 1002 } |
| 981 } | 1003 } |
| 982 | 1004 |
| 983 | 1005 |
| 984 void ARM64Decoder::DecodeDPSimd2(Instr* instr) { | 1006 void ARM64Decoder::DecodeDPSimd2(Instr* instr) { |
| 985 if (instr->IsFPOp()) { | 1007 if (instr->IsFPOp()) { |
| 986 DecodeFP(instr); | 1008 DecodeFP(instr); |
| 987 } else { | 1009 } else { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 human_buffer, | 1074 human_buffer, |
| 1053 sizeof(human_buffer), | 1075 sizeof(human_buffer), |
| 1054 pc); | 1076 pc); |
| 1055 pc += instruction_length; | 1077 pc += instruction_length; |
| 1056 } | 1078 } |
| 1057 } | 1079 } |
| 1058 | 1080 |
| 1059 } // namespace dart | 1081 } // namespace dart |
| 1060 | 1082 |
| 1061 #endif // defined TARGET_ARCH_ARM | 1083 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |