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

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

Issue 1722013002: Enable concurrent sweep on MIPS and ARM64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clrex and assembler tests Created 4 years, 10 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
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/disassembler_mips.cc » ('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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 PrintRegister(reg, R31IsZR); 327 PrintRegister(reg, R31IsZR);
328 return 2; 328 return 2;
329 } else if (format[1] == 't') { // 'rt: Rt register 329 } else if (format[1] == 't') { // 'rt: Rt register
330 int reg = instr->RtField(); 330 int reg = instr->RtField();
331 PrintRegister(reg, R31IsZR); 331 PrintRegister(reg, R31IsZR);
332 return 2; 332 return 2;
333 } else if (format[1] == 'a') { // 'ra: Ra register 333 } else if (format[1] == 'a') { // 'ra: Ra register
334 int reg = instr->RaField(); 334 int reg = instr->RaField();
335 PrintRegister(reg, R31IsZR); 335 PrintRegister(reg, R31IsZR);
336 return 2; 336 return 2;
337 } else if (format[1] == 's') { // 'rs: Rs register
338 int reg = instr->RsField();
339 PrintRegister(reg, R31IsZR);
340 return 2;
337 } 341 }
338 UNREACHABLE(); 342 UNREACHABLE();
339 return -1; 343 return -1;
340 } 344 }
341 345
342 346
343 int ARM64Decoder::FormatVRegister(Instr* instr, const char* format) { 347 int ARM64Decoder::FormatVRegister(Instr* instr, const char* format) {
344 ASSERT(format[0] == 'v'); 348 ASSERT(format[0] == 'v');
345 if (format[1] == 'd') { 349 if (format[1] == 'd') {
346 int reg = instr->VdField(); 350 int reg = instr->VdField();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 Unknown(instr); 739 Unknown(instr);
736 } 740 }
737 if (instr->Bit(30)) { 741 if (instr->Bit(30)) {
738 Format(instr, "ldrx 'rt, 'pcldr"); 742 Format(instr, "ldrx 'rt, 'pcldr");
739 } else { 743 } else {
740 Format(instr, "ldrw 'rt, 'pcldr"); 744 Format(instr, "ldrw 'rt, 'pcldr");
741 } 745 }
742 } 746 }
743 747
744 748
749 void ARM64Decoder::DecodeLoadStoreExclusive(Instr* instr) {
750 if ((instr->Bit(23) != 0) ||
751 (instr->Bit(21) != 0) ||
752 (instr->Bit(15) != 0)) {
753 Unknown(instr);
754 }
755 const int32_t size = instr->Bits(30, 2);
756 if (size != 3) {
757 Unknown(instr);
758 }
759
760 const bool is_load = instr->Bit(22) == 1;
761 if (is_load) {
762 Format(instr, "ldxr 'rt, 'rn");
763 } else {
764 Format(instr, "stxr 'rs, 'rt, 'rn");
765 }
766 }
767
768
745 void ARM64Decoder::DecodeAddSubImm(Instr* instr) { 769 void ARM64Decoder::DecodeAddSubImm(Instr* instr) {
746 switch (instr->Bit(30)) { 770 switch (instr->Bit(30)) {
747 case 0: { 771 case 0: {
748 if ((instr->RdField() == R31) && (instr->SField() == 1)) { 772 if ((instr->RdField() == R31) && (instr->SField() == 1)) {
749 Format(instr, "cmni'sf 'rn, 'imm12s"); 773 Format(instr, "cmni'sf 'rn, 'imm12s");
750 } else { 774 } else {
751 if (((instr->RdField() == R31) || (instr->RnField() == R31)) && 775 if (((instr->RdField() == R31) || (instr->RnField() == R31)) &&
752 (instr->Imm12Field() == 0) && (instr->Bit(29) == 0)) { 776 (instr->Imm12Field() == 0) && (instr->Bit(29) == 0)) {
753 Format(instr, "mov'sf 'rd, 'rn"); 777 Format(instr, "mov'sf 'rd, 'rn");
754 } else { 778 } else {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && 866 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) &&
843 (instr->Bits(21, 3) == 2)) { 867 (instr->Bits(21, 3) == 2)) {
844 Format(instr, "hlt 'imm16"); 868 Format(instr, "hlt 'imm16");
845 } else { 869 } else {
846 Unknown(instr); 870 Unknown(instr);
847 } 871 }
848 } 872 }
849 873
850 874
851 void ARM64Decoder::DecodeSystem(Instr* instr) { 875 void ARM64Decoder::DecodeSystem(Instr* instr) {
876 if (instr->InstructionBits() == CLREX) {
877 Format(instr, "clrex");
878 return;
879 }
880
852 if ((instr->Bits(0, 8) == 0x1f) && (instr->Bits(12, 4) == 2) && 881 if ((instr->Bits(0, 8) == 0x1f) && (instr->Bits(12, 4) == 2) &&
853 (instr->Bits(16, 3) == 3) && (instr->Bits(19, 2) == 0) && 882 (instr->Bits(16, 3) == 3) && (instr->Bits(19, 2) == 0) &&
854 (instr->Bit(21) == 0)) { 883 (instr->Bit(21) == 0)) {
855 if (instr->Bits(8, 4) == 0) { 884 if (instr->Bits(8, 4) == 0) {
856 Format(instr, "nop"); 885 Format(instr, "nop");
857 } else { 886 } else {
858 Unknown(instr); 887 Unknown(instr);
859 } 888 }
860 } else { 889 } else {
861 Unknown(instr); 890 Unknown(instr);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 } 972 }
944 973
945 974
946 void ARM64Decoder::DecodeLoadStore(Instr* instr) { 975 void ARM64Decoder::DecodeLoadStore(Instr* instr) {
947 if (instr->IsLoadStoreRegOp()) { 976 if (instr->IsLoadStoreRegOp()) {
948 DecodeLoadStoreReg(instr); 977 DecodeLoadStoreReg(instr);
949 } else if (instr->IsLoadStoreRegPairOp()) { 978 } else if (instr->IsLoadStoreRegPairOp()) {
950 DecodeLoadStoreRegPair(instr); 979 DecodeLoadStoreRegPair(instr);
951 } else if (instr->IsLoadRegLiteralOp()) { 980 } else if (instr->IsLoadRegLiteralOp()) {
952 DecodeLoadRegLiteral(instr); 981 DecodeLoadRegLiteral(instr);
982 } else if (instr->IsLoadStoreExclusiveOp()) {
983 DecodeLoadStoreExclusive(instr);
953 } else { 984 } else {
954 Unknown(instr); 985 Unknown(instr);
955 } 986 }
956 } 987 }
957 988
958 989
959 void ARM64Decoder::DecodeAddSubShiftExt(Instr* instr) { 990 void ARM64Decoder::DecodeAddSubShiftExt(Instr* instr) {
960 switch (instr->Bit(30)) { 991 switch (instr->Bit(30)) {
961 case 0: { 992 case 0: {
962 if ((instr->RdField() == R31) && (instr->SFField())) { 993 if ((instr->RdField() == R31) && (instr->SFField())) {
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 if (out_instr_size) { 1496 if (out_instr_size) {
1466 *out_instr_size = Instr::kInstrSize; 1497 *out_instr_size = Instr::kInstrSize;
1467 } 1498 }
1468 } 1499 }
1469 1500
1470 #endif // !PRODUCT 1501 #endif // !PRODUCT
1471 1502
1472 } // namespace dart 1503 } // namespace dart
1473 1504
1474 #endif // defined TARGET_ARCH_ARM 1505 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698