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

Side by Side Diff: test/cctest/test-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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 COMPARE(ldpsw(x0, x1, MemOperand(x2)), "ldpsw x0, x1, [x2]"); 1253 COMPARE(ldpsw(x0, x1, MemOperand(x2)), "ldpsw x0, x1, [x2]");
1254 COMPARE(ldpsw(x3, x4, MemOperand(x5, 16)), "ldpsw x3, x4, [x5, #16]"); 1254 COMPARE(ldpsw(x3, x4, MemOperand(x5, 16)), "ldpsw x3, x4, [x5, #16]");
1255 COMPARE(ldpsw(x6, x7, MemOperand(x8, -32, PreIndex)), 1255 COMPARE(ldpsw(x6, x7, MemOperand(x8, -32, PreIndex)),
1256 "ldpsw x6, x7, [x8, #-32]!"); 1256 "ldpsw x6, x7, [x8, #-32]!");
1257 COMPARE(ldpsw(x9, x10, MemOperand(x11, 128, PostIndex)), 1257 COMPARE(ldpsw(x9, x10, MemOperand(x11, 128, PostIndex)),
1258 "ldpsw x9, x10, [x11], #128"); 1258 "ldpsw x9, x10, [x11], #128");
1259 1259
1260 CLEANUP(); 1260 CLEANUP();
1261 } 1261 }
1262 1262
1263 TEST_(load_store_exclusive) {
1264 SET_UP_MASM();
1265
1266 COMPARE(ldxr(w6, x7), "ldxr w6, [x7]");
1267 COMPARE(ldxrb(w8, x9), "ldxrb w8, [x9]");
1268 COMPARE(ldxrh(w10, x11), "ldxrh w10, [x11]");
1269 COMPARE(stxr(w18, w19, x20), "stxr w18, w19, [x20]");
1270 COMPARE(stxrb(w21, w22, x23), "stxrb w21, w22, [x23]");
1271 COMPARE(stxrh(w24, w25, x26), "stxrh w24, w25, [x26]");
1272 COMPARE(ldxr(wzr, csp), "ldxr wzr, [csp]");
1273 COMPARE(stxr(wzr, wzr, csp), "stxr wzr, wzr, [csp]");
1274
1275 CLEANUP();
1276 }
1277
1263 TEST_(load_store_acquire_release) { 1278 TEST_(load_store_acquire_release) {
1264 SET_UP_MASM(); 1279 SET_UP_MASM();
1265 1280
1266 COMPARE(ldar(w0, x1), "ldar w0, [x1]"); 1281 COMPARE(ldar(w0, x1), "ldar w0, [x1]");
1267 COMPARE(ldarb(w2, x3), "ldarb w2, [x3]"); 1282 COMPARE(ldarb(w2, x3), "ldarb w2, [x3]");
1268 COMPARE(ldarh(w4, x5), "ldarh w4, [x5]"); 1283 COMPARE(ldarh(w4, x5), "ldarh w4, [x5]");
1269 COMPARE(ldaxr(w6, x7), "ldaxr w6, [x7]"); 1284 COMPARE(ldaxr(w6, x7), "ldaxr w6, [x7]");
1270 COMPARE(ldaxrb(w8, x9), "ldaxrb w8, [x9]"); 1285 COMPARE(ldaxrb(w8, x9), "ldaxrb w8, [x9]");
1271 COMPARE(ldaxrh(w10, x11), "ldaxrh w10, [x11]"); 1286 COMPARE(ldaxrh(w10, x11), "ldaxrh w10, [x11]");
1272 COMPARE(stlr(w12, x13), "stlr w12, [x13]"); 1287 COMPARE(stlr(w12, x13), "stlr w12, [x13]");
1273 COMPARE(stlrb(w14, x15), "stlrb w14, [x15]"); 1288 COMPARE(stlrb(w14, x15), "stlrb w14, [x15]");
1274 COMPARE(stlrh(w16, x17), "stlrh w16, [x17]"); 1289 COMPARE(stlrh(w16, x17), "stlrh w16, [x17]");
1275 COMPARE(stlxr(w18, w19, x20), "stlxr w18, w19, [x20]"); 1290 COMPARE(stlxr(w18, w19, x20), "stlxr w18, w19, [x20]");
1276 COMPARE(stlxrb(w21, w22, x23), "stlxrb w21, w22, [x23]"); 1291 COMPARE(stlxrb(w21, w22, x23), "stlxrb w21, w22, [x23]");
1277 COMPARE(stlxrh(w24, w25, x26), "stlxrh w24, w25, [x26]"); 1292 COMPARE(stlxrh(w24, w25, x26), "stlxrh w24, w25, [x26]");
1293 COMPARE(ldar(wzr, csp), "ldar wzr, [csp]");
1294 COMPARE(stlr(wzr, csp), "stlr wzr, [csp]");
1295 COMPARE(ldaxr(wzr, csp), "ldaxr wzr, [csp]");
1296 COMPARE(stlxr(wzr, wzr, csp), "stlxr wzr, wzr, [csp]");
1278 1297
1279 CLEANUP(); 1298 CLEANUP();
1280 } 1299 }
1281 1300
1282 #if 0 // TODO(all): enable. 1301 #if 0 // TODO(all): enable.
1283 TEST_(load_literal) { 1302 TEST_(load_literal) {
1284 SET_UP_ASM(); 1303 SET_UP_ASM();
1285 1304
1286 COMPARE_PREFIX(ldr(x10, 0x1234567890abcdefUL), "ldr x10, pc+8"); 1305 COMPARE_PREFIX(ldr(x10, 0x1234567890abcdefUL), "ldr x10, pc+8");
1287 COMPARE_PREFIX(ldr(w20, 0xfedcba09), "ldr w20, pc+8"); 1306 COMPARE_PREFIX(ldr(w20, 0xfedcba09), "ldr w20, pc+8");
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); 1790 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)");
1772 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); 1791 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)");
1773 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); 1792 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)");
1774 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); 1793 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)");
1775 1794
1776 // ISB 1795 // ISB
1777 COMPARE(Isb(), "isb"); 1796 COMPARE(Isb(), "isb");
1778 1797
1779 CLEANUP(); 1798 CLEANUP();
1780 } 1799 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698