Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1082)

Side by Side Diff: runtime/vm/disassembler_arm64.cc

Issue 630093004: Fix 32-bit and 64-bit carry out calculation in arm64 simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/simulator_arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 962 }
963 break; 963 break;
964 } 964 }
965 default: 965 default:
966 UNREACHABLE(); 966 UNREACHABLE();
967 break; 967 break;
968 } 968 }
969 } 969 }
970 970
971 971
972 void ARM64Decoder::DecodeAddSubWithCarry(Instr* instr) {
973 switch (instr->Bit(30)) {
974 case 0: {
975 Format(instr, "adc'sf's 'rd, 'rn, 'rm");
976 break;
977 }
978 case 1: {
979 Format(instr, "sbc'sf's 'rd, 'rn, 'rm");
980 break;
981 }
982 default:
983 UNREACHABLE();
984 break;
985 }
986 }
987
988
972 void ARM64Decoder::DecodeLogicalShift(Instr* instr) { 989 void ARM64Decoder::DecodeLogicalShift(Instr* instr) {
973 const int op = (instr->Bits(29, 2) << 1) | instr->Bit(21); 990 const int op = (instr->Bits(29, 2) << 1) | instr->Bit(21);
974 switch (op) { 991 switch (op) {
975 case 0: 992 case 0:
976 Format(instr, "and'sf 'rd, 'rn, 'shift_op"); 993 Format(instr, "and'sf 'rd, 'rn, 'shift_op");
977 break; 994 break;
978 case 1: 995 case 1:
979 Format(instr, "bic'sf 'rd, 'rn, 'shift_op"); 996 Format(instr, "bic'sf 'rd, 'rn, 'shift_op");
980 break; 997 break;
981 case 2: { 998 case 2: {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 Format(instr, "csinv'sf'cond 'rd, 'rn, 'rm"); 1084 Format(instr, "csinv'sf'cond 'rd, 'rn, 'rm");
1068 } else { 1085 } else {
1069 Unknown(instr); 1086 Unknown(instr);
1070 } 1087 }
1071 } 1088 }
1072 1089
1073 1090
1074 void ARM64Decoder::DecodeDPRegister(Instr* instr) { 1091 void ARM64Decoder::DecodeDPRegister(Instr* instr) {
1075 if (instr->IsAddSubShiftExtOp()) { 1092 if (instr->IsAddSubShiftExtOp()) {
1076 DecodeAddSubShiftExt(instr); 1093 DecodeAddSubShiftExt(instr);
1094 } else if (instr->IsAddSubWithCarryOp()) {
1095 DecodeAddSubWithCarry(instr);
1077 } else if (instr->IsLogicalShiftOp()) { 1096 } else if (instr->IsLogicalShiftOp()) {
1078 DecodeLogicalShift(instr); 1097 DecodeLogicalShift(instr);
1079 } else if (instr->IsMiscDP2SourceOp()) { 1098 } else if (instr->IsMiscDP2SourceOp()) {
1080 DecodeMiscDP2Source(instr); 1099 DecodeMiscDP2Source(instr);
1081 } else if (instr->IsMiscDP3SourceOp()) { 1100 } else if (instr->IsMiscDP3SourceOp()) {
1082 DecodeMiscDP3Source(instr); 1101 DecodeMiscDP3Source(instr);
1083 } else if (instr->IsConditionalSelectOp()) { 1102 } else if (instr->IsConditionalSelectOp()) {
1084 DecodeConditionalSelect(instr); 1103 DecodeConditionalSelect(instr);
1085 } else { 1104 } else {
1086 Unknown(instr); 1105 Unknown(instr);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 human_buffer, 1460 human_buffer,
1442 sizeof(human_buffer), 1461 sizeof(human_buffer),
1443 pc); 1462 pc);
1444 pc += instruction_length; 1463 pc += instruction_length;
1445 } 1464 }
1446 } 1465 }
1447 1466
1448 } // namespace dart 1467 } // namespace dart
1449 1468
1450 #endif // defined TARGET_ARCH_ARM 1469 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/simulator_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698