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

Unified Diff: test/cctest/test-disasm-ia32.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 | « src/x64/disasm-x64.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-disasm-ia32.cc
diff --git a/test/cctest/test-disasm-ia32.cc b/test/cctest/test-disasm-ia32.cc
index 3ecd7b325628e302c17d3838715f3a0175aa3a9e..e0fe9697bafa35d0bc613b2cb3142d0e53cb9563 100644
--- a/test/cctest/test-disasm-ia32.cc
+++ b/test/cctest/test-disasm-ia32.cc
@@ -665,12 +665,30 @@ TEST(DisasmIa320) {
// xchg.
{
+ __ xchg_b(eax, Operand(eax, 8));
+ __ xchg_w(eax, Operand(ebx, 8));
__ xchg(eax, eax);
__ xchg(eax, ebx);
__ xchg(ebx, ebx);
__ xchg(ebx, Operand(esp, 12));
}
+ // cmpxchg.
+ {
+ __ cmpxchg_b(Operand(esp, 12), eax);
+ __ cmpxchg_w(Operand(ebx, ecx, times_4, 10000), eax);
+ __ cmpxchg(Operand(ebx, ecx, times_4, 10000), eax);
+ }
+
+ // lock prefix.
+ {
+ __ lock();
+ __ cmpxchg(Operand(esp, 12), ebx);
+
+ __ lock();
+ __ xchg_w(eax, Operand(ecx, 8));
+ }
+
// Nop instructions
for (int i = 0; i < 16; i++) {
__ Nop(i);
« no previous file with comments | « src/x64/disasm-x64.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698