aboutsummaryrefslogtreecommitdiff
path: root/test/transform-dis-cases-x86_64.S
diff options
context:
space:
mode:
authorcomex2015-02-23 00:52:55 -0500
committercomex2015-02-23 00:54:14 -0500
commit3ea0b595a9783282c233f0c7910c11688f9ae721 (patch)
treea1ba64ff739fb2852c2f13a2dfe85deabe362b37 /test/transform-dis-cases-x86_64.S
parentBan calls within transform regions in threadsafe mode. (diff)
downloadsubstitute-3ea0b595a9783282c233f0c7910c11688f9ae721.tar.gz
Add transform-dis-cases-arm64.S and fix a serious bug thus discovered.
Commit transform-dis-cases-x86_64.S, which I forgot to earlier.
Diffstat (limited to '')
-rw-r--r--test/transform-dis-cases-x86_64.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/transform-dis-cases-x86_64.S b/test/transform-dis-cases-x86_64.S
new file mode 100644
index 0000000..7dccf24
--- /dev/null
+++ b/test/transform-dis-cases-x86_64.S
@@ -0,0 +1,13 @@
+#define GIVEN .ascii "GIVEN";
+#define EXPECT .ascii "EXPECT";
+#define EXPECT_ERR .ascii "EXPECT_ERR";
+
+GIVEN nopl (%rip)
+EXPECT push %rcx; mov $0xdead0007, %rcx; nopl (%rcx); pop %rcx
+GIVEN mov (%rip), %rax
+EXPECT push %rcx; mov $0xdead0007, %rcx; mov (%rcx), %rax; pop %rcx
+GIVEN mov (%rip), %rcx
+EXPECT push %rax; mov $0xdead0007, %rax; mov (%rax), %rcx; pop %rax
+GIVEN jmpq *(%rip)
+EXPECT push %rax; mov $0xdead0006, %rax; mov %rax, -8(%rsp); pop %rax;
+ jmp *-0x10(%rsp)