aboutsummaryrefslogtreecommitdiff
path: root/test/transform-dis-cases-i386.S
diff options
context:
space:
mode:
authorcomex2015-02-14 23:50:30 -0500
committercomex2015-02-14 23:50:30 -0500
commit7dd3043eed8d9bac9ce48765335fdbe52b907b42 (patch)
treef62413fb90461eb4d1f71d695adc730f4722edb1 /test/transform-dis-cases-i386.S
parentTrampoline fixes. (diff)
downloadsubstitute-7dd3043eed8d9bac9ce48765335fdbe52b907b42.tar.gz
fix test cases
Diffstat (limited to 'test/transform-dis-cases-i386.S')
-rw-r--r--test/transform-dis-cases-i386.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/transform-dis-cases-i386.S b/test/transform-dis-cases-i386.S
index 57707cc..3e468d4 100644
--- a/test/transform-dis-cases-i386.S
+++ b/test/transform-dis-cases-i386.S
@@ -10,8 +10,10 @@ GIVEN jmp 0f; 0: nop
EXPECT_ERR
GIVEN jne .+0x1000
-/* we expect to generate an unnecessarily long jump, so hardcode it */
-EXPECT 2: .byte 0x0f, 0x85; .long 2; jmp 1f; 0: jmp 2b+0x1000; 1:
+/* we expect to generate an unnecessarily long jump, so hardcode it the 0x10000
+ * is because we pretend our trampoline is 0x10000 bytes before the original
+ * function */
+EXPECT 2: .byte 0x0f, 0x85; .long 2; jmp 1f; 0: jmp .+0x10000+0x1000-8; 1:
-GIVEN loopne 0xdead0080
-EXPECT loopne 0f; jmp 1f; 0: jmp 0xdead1000; 1:
+GIVEN loopne .+0x80
+EXPECT loopne 0f; jmp 1f; 0: jmp .+0x10000+0x80-4; 1: