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

Unified Diff: test/cctest/test-disasm-x64.cc

Issue 1986113004: Add cmpxchg and lock instructions to x64 and ia32 {dis,}assemblers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-disasm-x64.cc
diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc
index b855626cee33277f26a5480c175912de60db5934..59ad683ba4e684a780a9cc7c69b20ef077247a35 100644
--- a/test/cctest/test-disasm-x64.cc
+++ b/test/cctest/test-disasm-x64.cc
@@ -745,12 +745,31 @@ TEST(DisasmX64) {
// xchg.
{
+ __ xchgb(rax, Operand(rax, 8));
+ __ xchgw(rax, Operand(rbx, 8));
__ xchgq(rax, rax);
__ xchgq(rax, rbx);
__ xchgq(rbx, rbx);
__ xchgq(rbx, Operand(rsp, 12));
}
+ // cmpxchg.
+ {
+ __ cmpxchgb(Operand(rsp, 12), rax);
+ __ cmpxchgw(Operand(rbx, rcx, times_4, 10000), rax);
+ __ cmpxchgl(Operand(rbx, rcx, times_4, 10000), rax);
+ __ cmpxchgq(Operand(rbx, rcx, times_4, 10000), rax);
+ }
+
+ // lock prefix.
+ {
+ __ lock();
+ __ cmpxchgl(Operand(rsp, 12), rbx);
+
+ __ lock();
+ __ xchgw(rax, Operand(rcx, 8));
+ }
+
// Nop instructions
for (int i = 0; i < 16; i++) {
__ Nop(i);
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698