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

Side by Side Diff: src/arm64/disasm-arm64.cc

Issue 2754543006: [arm64] Use exclusive instructions in exchange (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <assert.h> 5 #include <assert.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #if V8_TARGET_ARCH_ARM64 10 #if V8_TARGET_ARCH_ARM64
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 907
908 switch (instr->Mask(LoadStorePairOffsetMask)) { 908 switch (instr->Mask(LoadStorePairOffsetMask)) {
909 #define LSP_OFFSET(A, B, C, D) \ 909 #define LSP_OFFSET(A, B, C, D) \
910 case A##_off: mnemonic = B; form = C ", ['Xns'ILP" D "]"; break; 910 case A##_off: mnemonic = B; form = C ", ['Xns'ILP" D "]"; break;
911 LOAD_STORE_PAIR_LIST(LSP_OFFSET) 911 LOAD_STORE_PAIR_LIST(LSP_OFFSET)
912 #undef LSP_OFFSET 912 #undef LSP_OFFSET
913 } 913 }
914 Format(instr, mnemonic, form); 914 Format(instr, mnemonic, form);
915 } 915 }
916 916
917 void DisassemblingDecoder::VisitLoadStoreExclusive(Instruction* instr) {
918 const char* mnemonic = "unimplemented";
919 const char* form = "'Wt, ['Xns]";
920 const char* form_x = "'Xt, ['Xns]";
921 const char* form_stx = "'Ws, 'Wt, ['Xns]";
922 const char* form_stx_x = "'Ws, 'Xt, ['Xns]";
923
924 switch (instr->Mask(LoadStoreExclusiveMask)) {
925 case STXRB:
926 mnemonic = "stxrb";
927 form = form_stx;
928 break;
929 case LDXRB:
930 mnemonic = "ldxrb";
931 break;
932 case STXRH:
933 mnemonic = "stxrh";
934 form = form_stx;
935 break;
936 case LDXRH:
937 mnemonic = "ldxrh";
938 break;
939 case STXR_w:
940 mnemonic = "stxr";
941 form = form_stx;
942 break;
943 case LDXR_w:
944 mnemonic = "ldxr";
945 break;
946 case STXR_x:
947 mnemonic = "stxr";
948 form = form_stx_x;
949 break;
950 case LDXR_x:
951 mnemonic = "ldxr";
952 form = form_x;
953 break;
954 default:
955 form = "(LoadStoreExclusive)";
956 }
957 Format(instr, mnemonic, form);
958 }
959
917 void DisassemblingDecoder::VisitLoadStoreAcquireRelease(Instruction *instr) { 960 void DisassemblingDecoder::VisitLoadStoreAcquireRelease(Instruction *instr) {
918 const char *mnemonic = "unimplemented"; 961 const char *mnemonic = "unimplemented";
919 const char *form = "'Wt, ['Xn]"; 962 const char* form = "'Wt, ['Xns]";
920 const char *form_x = "'Xt, ['Xn]"; 963 const char* form_x = "'Xt, ['Xns]";
921 const char *form_stlx = "'Ws, 'Wt, ['Xn]"; 964 const char* form_stlx = "'Ws, 'Wt, ['Xns]";
922 const char *form_stlx_x = "'Ws, 'Xt, ['Xn]"; 965 const char* form_stlx_x = "'Ws, 'Xt, ['Xns]";
923 966
924 switch (instr->Mask(LoadStoreAcquireReleaseMask)) { 967 switch (instr->Mask(LoadStoreAcquireReleaseMask)) {
925 case LDAXR_b: mnemonic = "ldaxrb"; break; 968 case LDAXR_b: mnemonic = "ldaxrb"; break;
926 case STLR_b: mnemonic = "stlrb"; break; 969 case STLR_b: mnemonic = "stlrb"; break;
927 case LDAR_b: mnemonic = "ldarb"; break; 970 case LDAR_b: mnemonic = "ldarb"; break;
928 case LDAXR_h: mnemonic = "ldaxrh"; break; 971 case LDAXR_h: mnemonic = "ldaxrh"; break;
929 case STLR_h: mnemonic = "stlrh"; break; 972 case STLR_h: mnemonic = "stlrh"; break;
930 case LDAR_h: mnemonic = "ldarh"; break; 973 case LDAR_h: mnemonic = "ldarh"; break;
931 case LDAXR_w: mnemonic = "ldaxr"; break; 974 case LDAXR_w: mnemonic = "ldaxr"; break;
932 case STLR_w: mnemonic = "stlr"; break; 975 case STLR_w: mnemonic = "stlr"; break;
933 case LDAR_w: mnemonic = "ldar"; break; 976 case LDAR_w: mnemonic = "ldar"; break;
934 case LDAXR_x: mnemonic = "ldaxr"; form = form_x; break; 977 case LDAXR_x: mnemonic = "ldaxr"; form = form_x; break;
935 case STLR_x: mnemonic = "stlr"; form = form_x; break; 978 case STLR_x: mnemonic = "stlr"; form = form_x; break;
936 case LDAR_x: mnemonic = "ldar"; form = form_x; break; 979 case LDAR_x: mnemonic = "ldar"; form = form_x; break;
937 case STLXR_h: mnemonic = "stlxrh"; form = form_stlx; break; 980 case STLXR_h: mnemonic = "stlxrh"; form = form_stlx; break;
938 case STLXR_b: mnemonic = "stlxrb"; form = form_stlx; break; 981 case STLXR_b: mnemonic = "stlxrb"; form = form_stlx; break;
939 case STLXR_w: mnemonic = "stlxr"; form = form_stlx; break; 982 case STLXR_w: mnemonic = "stlxr"; form = form_stlx; break;
940 case STLXR_x: mnemonic = "stlxr"; form = form_stlx_x; break; 983 case STLXR_x: mnemonic = "stlxr"; form = form_stlx_x; break;
941 default: form = "(LoadStoreAcquireReleaseMask)"; 984 default:
985 form = "(LoadStoreAcquireRelease)";
942 } 986 }
943 Format(instr, mnemonic, form); 987 Format(instr, mnemonic, form);
944 } 988 }
945 989
946 void DisassemblingDecoder::VisitFPCompare(Instruction* instr) { 990 void DisassemblingDecoder::VisitFPCompare(Instruction* instr) {
947 const char *mnemonic = "unimplemented"; 991 const char *mnemonic = "unimplemented";
948 const char *form = "'Fn, 'Fm"; 992 const char *form = "'Fn, 'Fm";
949 const char *form_zero = "'Fn, #0.0"; 993 const char *form_zero = "'Fn, #0.0";
950 994
951 switch (instr->Mask(FPCompareMask)) { 995 switch (instr->Mask(FPCompareMask)) {
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 decoder.AppendVisitor(&disasm); 1884 decoder.AppendVisitor(&disasm);
1841 1885
1842 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) { 1886 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) {
1843 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc)); 1887 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc));
1844 } 1888 }
1845 } 1889 }
1846 1890
1847 } // namespace disasm 1891 } // namespace disasm
1848 1892
1849 #endif // V8_TARGET_ARCH_ARM64 1893 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698