summary refs log tree commit diff
path: root/gnu/packages/patches/e9patch-check-mov-imm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/e9patch-check-mov-imm.patch')
-rw-r--r--gnu/packages/patches/e9patch-check-mov-imm.patch575
1 files changed, 575 insertions, 0 deletions
diff --git a/gnu/packages/patches/e9patch-check-mov-imm.patch b/gnu/packages/patches/e9patch-check-mov-imm.patch
new file mode 100644
index 0000000000..697aa0f865
--- /dev/null
+++ b/gnu/packages/patches/e9patch-check-mov-imm.patch
@@ -0,0 +1,575 @@
+From 149018a871547d9ae24a1e00d0ce6e13a2c0f306 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= <cnx@loang.net>
+Date: Mon, 18 Nov 2024 14:46:59 +0900
+Subject: [PATCH] Fix mov's immediates' sign in test expectation
+
+Automatic signedness in Zydis infers from the instruction.
+In this case, the immediate should be signed.
+
+References: https://github.com/zyantific/zydis/discussions/538
+---
+ test/regtest/after.exp            | 2 +-
+ test/regtest/after_print.exp      | 2 +-
+ test/regtest/bb_info.exp          | 2 +-
+ test/regtest/bit_or.exp           | 2 +-
+ test/regtest/callx2.exp           | 2 +-
+ test/regtest/cond_0.exp           | 2 +-
+ test/regtest/cond_1.exp           | 2 +-
+ test/regtest/condjump_0.exp       | 2 +-
+ test/regtest/dst_zero.exp         | 2 +-
+ test/regtest/example_13.exp       | 2 +-
+ test/regtest/example_4.exp        | 2 +-
+ test/regtest/example_5.exp        | 2 +-
+ test/regtest/example_7.exp        | 2 +-
+ test/regtest/f_info.exp           | 2 +-
+ test/regtest/multi.exp            | 2 +-
+ test/regtest/naked.exp            | 2 +-
+ test/regtest/naked_2.exp          | 2 +-
+ test/regtest/next.exp             | 2 +-
+ test/regtest/not_regex.exp        | 1 -
+ test/regtest/optimize_0.exp       | 2 +-
+ test/regtest/optimize_1.exp       | 2 +-
+ test/regtest/optimize_2.exp       | 2 +-
+ test/regtest/optimize_3.exp       | 2 +-
+ test/regtest/optimize_s.exp       | 2 +-
+ test/regtest/print.exp            | 2 +-
+ test/regtest/print_pie.exp        | 2 +-
+ test/regtest/printx2.exp          | 4 ++--
+ test/regtest/reads_leq_writes.exp | 2 +-
+ test/regtest/regs_2.exp           | 2 +-
+ test/regtest/replace_print.exp    | 2 +-
+ test/regtest/rex.exp              | 2 +-
+ test/regtest/rip_rsp_rflags.exp   | 2 +-
+ test/regtest/rip_to_rsp.exp       | 2 +-
+ test/regtest/rotate.exp           | 2 +-
+ test/regtest/skip.exp             | 2 +-
+ test/regtest/src_dst.exp          | 2 +-
+ test/regtest/static.exp           | 2 +-
+ test/regtest/sum.exp              | 2 +-
+ test/regtest/trunc32.exp          | 2 +-
+ test/regtest/types.exp            | 2 +-
+ test/regtest/zero_flags.exp       | 2 +-
+ test/regtest/zero_flags_2.exp     | 2 +-
+ 42 files changed, 42 insertions(+), 43 deletions(-)
+
+diff --git a/test/regtest/after.exp b/test/regtest/after.exp
+index 9c64090..5b3b067 100644
+--- a/test/regtest/after.exp
++++ b/test/regtest/after.exp
+@@ -2,7 +2,7 @@
+ 000000000a000108:000000000c007ff8:0000000000004600: 41 57                   push %r15
+ 000000000a00010a:000000000c007ff8:0000000000004600: 78 fc                   js 0xa000106
+ 000000000a000111:000000000c007ff8:0000000000004600: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a00011b:000000000c007ff8:0000000000004600: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a00011b:000000000c007ff8:0000000000004600: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011e:000000000c007ff8:0000000000004600: 48 39 c3                cmp %rax, %rbx
+ 000000000a000124:000000000c007ff8:0000000000004600: 66 90                   nop
+diff --git a/test/regtest/after_print.exp b/test/regtest/after_print.exp
+index a7b8ea9..6479ba7 100644
+--- a/test/regtest/after_print.exp
++++ b/test/regtest/after_print.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ nop
+ nopl %eax, (%rax)
+diff --git a/test/regtest/bb_info.exp b/test/regtest/bb_info.exp
+index f289f60..b5bc3e3 100644
+--- a/test/regtest/bb_info.exp
++++ b/test/regtest/bb_info.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:0000000000000002:0000000000000004: 41 57                   push %r15
+ 000000000a000106:0000000000000002:0000000000000004: 78 fc                   js 0xa000106
+ 000000000a00010a:0000000000000004:0000000000000016: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a00010a:0000000000000004:0000000000000016: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a00010a:0000000000000004:0000000000000016: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00010a:0000000000000004:0000000000000016: 48 39 c3                cmp %rax, %rbx
+ 000000000a00010a:0000000000000004:0000000000000016: 74 02                   jz 0xa000122
+diff --git a/test/regtest/bit_or.exp b/test/regtest/bit_or.exp
+index 33cca3e..f44dd09 100644
+--- a/test/regtest/bit_or.exp
++++ b/test/regtest/bit_or.exp
+@@ -1,6 +1,6 @@
+ rex=0x41, asm="push %r15"
+ rex=0x48, asm="movq 0x5e(%rip), %rax"
+-rex=0x48, asm="mov $0x8877665544332211, %rbx"
++rex=0x48, asm="mov $-0x778899aabbccddef, %rbx"
+ rex=0x48, asm="cmp %rax, %rbx"
+ rex=0x4C, asm="movq 0x28(%rip), %r8"
+ rex=0x48, asm="movq 0x19a(%rip), %rcx"
+diff --git a/test/regtest/callx2.exp b/test/regtest/callx2.exp
+index 3786bc3..7afc2c8 100644
+--- a/test/regtest/callx2.exp
++++ b/test/regtest/callx2.exp
+@@ -1,6 +1,6 @@
+ movq 0x5e(%rip), %rax
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ nopl %eax, (%rax)
+ movq 0x28(%rip), %r8
+diff --git a/test/regtest/cond_0.exp b/test/regtest/cond_0.exp
+index e52e9cf..d2f3e9a 100644
+--- a/test/regtest/cond_0.exp
++++ b/test/regtest/cond_0.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/cond_1.exp b/test/regtest/cond_1.exp
+index 3a3c426..c24fa2f 100644
+--- a/test/regtest/cond_1.exp
++++ b/test/regtest/cond_1.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ ud2
+diff --git a/test/regtest/condjump_0.exp b/test/regtest/condjump_0.exp
+index e52e9cf..d2f3e9a 100644
+--- a/test/regtest/condjump_0.exp
++++ b/test/regtest/condjump_0.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/dst_zero.exp b/test/regtest/dst_zero.exp
+index 50ca033..61ba3b6 100644
+--- a/test/regtest/dst_zero.exp
++++ b/test/regtest/dst_zero.exp
+@@ -1,3 +1,3 @@
+ movq 0x5e(%rip), %rax # DST 8877665544332211 --> 0x0
+-mov $0x8877665544332211, %rbx # DST 8877665544332211 --> 0x0
++mov $-0x778899aabbccddef, %rbx # DST 8877665544332211 --> 0x0
+ Illegal instruction
+diff --git a/test/regtest/example_13.exp b/test/regtest/example_13.exp
+index d56e101..baff0bf 100644
+--- a/test/regtest/example_13.exp
++++ b/test/regtest/example_13.exp
+@@ -1,6 +1,6 @@
+ 000000000a000106:00000000e9e9e9e9:0000000000000000: 41 57                   push %r15
+ 000000000a00010a:8877665544332211:000000000b0b0b0b: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:8877665544332211:000000003e3e3e3e: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:8877665544332211:000000003e3e3e3e: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a000122:0000000000000000:0000000000000000: 66 90                   nop
+ 000000000a000128:0000000044332211:0000000000000000: 0f 1f 00                nopl %eax, (%rax)
+diff --git a/test/regtest/example_4.exp b/test/regtest/example_4.exp
+index 99b058f..7dbc25c 100644
+--- a/test/regtest/example_4.exp
++++ b/test/regtest/example_4.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000a000106:0000000000000002: 41 57                   push %r15
+ 000000000a000108:000000000a000108:0000000000000002: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000a00010a:0000000000000007: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000a000111:000000000000000a: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000a000111:000000000000000a: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000a00011b:0000000000000003: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000a00011e:0000000000000002: 74 02                   jz 0xa000122
+diff --git a/test/regtest/example_5.exp b/test/regtest/example_5.exp
+index b5b6bf3..67b0168 100644
+--- a/test/regtest/example_5.exp
++++ b/test/regtest/example_5.exp
+@@ -1,5 +1,5 @@
+ 0000000094949494:00000000c7c7c7c7:00000000b6b6b6b6: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-0000000094949494:00000000c7c7c7c7:00000000b6b6b6b6: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++0000000094949494:00000000c7c7c7c7:00000000b6b6b6b6: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 0000000094949494:00000000c7c7c7c7:00000000b6b6b6b6: 48 39 c3                cmp %rax, %rbx
+ 0000000094949494:00000000c7c7c7c7:00000000b6b6b6b6: 0f 1f 00                nopl %eax, (%rax)
+diff --git a/test/regtest/example_7.exp b/test/regtest/example_7.exp
+index fe807b4..0e38761 100644
+--- a/test/regtest/example_7.exp
++++ b/test/regtest/example_7.exp
+@@ -1,3 +1,3 @@
+-000000000a000111:8877665544332211:8877665544332211: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:8877665544332211:8877665544332211: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ PASSED
+diff --git a/test/regtest/f_info.exp b/test/regtest/f_info.exp
+index 569da6c..2c18b98 100644
+--- a/test/regtest/f_info.exp
++++ b/test/regtest/f_info.exp
+@@ -2,7 +2,7 @@
+ 0000000000000000:0000000000000000:0000000000000000: 41 57                   push %r15
+ 0000000000000000:0000000000000000:0000000000000000: 78 fc                   js 0xa000106
+ 0000000000000000:0000000000000000:0000000000000000: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-0000000000000000:0000000000000000:0000000000000000: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++0000000000000000:0000000000000000:0000000000000000: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 0000000000000000:0000000000000000:0000000000000000: 48 39 c3                cmp %rax, %rbx
+ 0000000000000000:0000000000000000:0000000000000000: 74 02                   jz 0xa000122
+diff --git a/test/regtest/multi.exp b/test/regtest/multi.exp
+index ac6c007..8bf6a2d 100644
+--- a/test/regtest/multi.exp
++++ b/test/regtest/multi.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae:
+ push %r15: 
+ js 0xa000106: 
+ movq 0x5e(%rip), %rax: rax 
+-mov $0x8877665544332211, %rbx: rbx 
++mov $-0x778899aabbccddef, %rbx: rbx 
+ cmp %rax, %rbx: rax rbx 
+ jz 0xa000122: 
+ nop: 
+diff --git a/test/regtest/naked.exp b/test/regtest/naked.exp
+index e52e9cf..d2f3e9a 100644
+--- a/test/regtest/naked.exp
++++ b/test/regtest/naked.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/naked_2.exp b/test/regtest/naked_2.exp
+index e52e9cf..d2f3e9a 100644
+--- a/test/regtest/naked_2.exp
++++ b/test/regtest/naked_2.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/next.exp b/test/regtest/next.exp
+index b33cd1a..6939b53 100644
+--- a/test/regtest/next.exp
++++ b/test/regtest/next.exp
+@@ -2,7 +2,7 @@
+ 0xa000106: push %r15 # goto 0xa000108
+ 0xa000108: js 0xa000106 # goto 0xa00010a
+ 0xa00010a: movq 0x5e(%rip), %rax # goto 0xa000111
+-0xa000111: mov $0x8877665544332211, %rbx # goto 0xa00011b
++0xa000111: mov $-0x778899aabbccddef, %rbx # goto 0xa00011b
+ 0xa00011b: cmp %rax, %rbx # goto 0xa00011e
+ 0xa00011e: jz 0xa000122 # goto 0xa000122
+ 0xa000122: nop # goto 0xa000124
+diff --git a/test/regtest/not_regex.exp b/test/regtest/not_regex.exp
+index c4f4004..2f62ac6 100644
+--- a/test/regtest/not_regex.exp
++++ b/test/regtest/not_regex.exp
+@@ -1,5 +1,4 @@
+ push %r15
+-mov $0x8877665544332211, %rbx
+ nop
+ cmp $0x33, %ebx
+ movq 0x28(%rip), %r8
+diff --git a/test/regtest/optimize_0.exp b/test/regtest/optimize_0.exp
+index 1499dc9..ebb0d13 100644
+--- a/test/regtest/optimize_0.exp
++++ b/test/regtest/optimize_0.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000000006f:ffffffffc7c7c7c7: 41 57                   push %r15
+ 000000000a000108:000000000000006e:ffffffffc7c7c7c7: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000000006d:ffffffffc7c7c7c7: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000000006b:ffffffffc7c7c7c7: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000000006a:ffffffffc7c7c7c7: 74 02                   jz 0xa000122
+diff --git a/test/regtest/optimize_1.exp b/test/regtest/optimize_1.exp
+index 1499dc9..ebb0d13 100644
+--- a/test/regtest/optimize_1.exp
++++ b/test/regtest/optimize_1.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000000006f:ffffffffc7c7c7c7: 41 57                   push %r15
+ 000000000a000108:000000000000006e:ffffffffc7c7c7c7: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000000006d:ffffffffc7c7c7c7: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000000006b:ffffffffc7c7c7c7: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000000006a:ffffffffc7c7c7c7: 74 02                   jz 0xa000122
+diff --git a/test/regtest/optimize_2.exp b/test/regtest/optimize_2.exp
+index 1499dc9..ebb0d13 100644
+--- a/test/regtest/optimize_2.exp
++++ b/test/regtest/optimize_2.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000000006f:ffffffffc7c7c7c7: 41 57                   push %r15
+ 000000000a000108:000000000000006e:ffffffffc7c7c7c7: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000000006d:ffffffffc7c7c7c7: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000000006b:ffffffffc7c7c7c7: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000000006a:ffffffffc7c7c7c7: 74 02                   jz 0xa000122
+diff --git a/test/regtest/optimize_3.exp b/test/regtest/optimize_3.exp
+index 1499dc9..ebb0d13 100644
+--- a/test/regtest/optimize_3.exp
++++ b/test/regtest/optimize_3.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000000006f:ffffffffc7c7c7c7: 41 57                   push %r15
+ 000000000a000108:000000000000006e:ffffffffc7c7c7c7: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000000006d:ffffffffc7c7c7c7: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000000006b:ffffffffc7c7c7c7: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000000006a:ffffffffc7c7c7c7: 74 02                   jz 0xa000122
+diff --git a/test/regtest/optimize_s.exp b/test/regtest/optimize_s.exp
+index 1499dc9..ebb0d13 100644
+--- a/test/regtest/optimize_s.exp
++++ b/test/regtest/optimize_s.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000000006f:ffffffffc7c7c7c7: 41 57                   push %r15
+ 000000000a000108:000000000000006e:ffffffffc7c7c7c7: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000000006d:ffffffffc7c7c7c7: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000000006c:ffffffffc7c7c7c7: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000000006b:ffffffffc7c7c7c7: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000000006a:ffffffffc7c7c7c7: 74 02                   jz 0xa000122
+diff --git a/test/regtest/print.exp b/test/regtest/print.exp
+index e52e9cf..d2f3e9a 100644
+--- a/test/regtest/print.exp
++++ b/test/regtest/print.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/print_pie.exp b/test/regtest/print_pie.exp
+index 42cb1b6..5cc8690 100644
+--- a/test/regtest/print_pie.exp
++++ b/test/regtest/print_pie.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/printx2.exp b/test/regtest/printx2.exp
+index 850e733..b80a83d 100644
+--- a/test/regtest/printx2.exp
++++ b/test/regtest/printx2.exp
+@@ -6,8 +6,8 @@ js 0xa000106
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+diff --git a/test/regtest/reads_leq_writes.exp b/test/regtest/reads_leq_writes.exp
+index 1bd6844..e1df687 100644
+--- a/test/regtest/reads_leq_writes.exp
++++ b/test/regtest/reads_leq_writes.exp
+@@ -1,5 +1,5 @@
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ nop
+ cmp $0x33, %ebx
+diff --git a/test/regtest/regs_2.exp b/test/regtest/regs_2.exp
+index 3605b69..141fcef 100644
+--- a/test/regtest/regs_2.exp
++++ b/test/regtest/regs_2.exp
+@@ -1,5 +1,5 @@
+ 000000000b0b0b0b:000000003e3e3e3e:000000002d2d2d2d: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-8877665544332211:000000003e3e3e3e:000000002d2d2d2d: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++8877665544332211:000000003e3e3e3e:000000002d2d2d2d: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 8877665544332211:8877665544332211:000000002d2d2d2d: 48 39 c3                cmp %rax, %rbx
+ 8877665544332211:8877665544332211:000000002d2d2d2d: 48 8b 0d 9a 01 00 00    movq 0x19a(%rip), %rcx
+diff --git a/test/regtest/replace_print.exp b/test/regtest/replace_print.exp
+index 3a3c426..c24fa2f 100644
+--- a/test/regtest/replace_print.exp
++++ b/test/regtest/replace_print.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ ud2
+diff --git a/test/regtest/rex.exp b/test/regtest/rex.exp
+index 5510819..718d536 100644
+--- a/test/regtest/rex.exp
++++ b/test/regtest/rex.exp
+@@ -1,5 +1,5 @@
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ movq 0x19a(%rip), %rcx
+ mov $-0x7777, %rcx
+diff --git a/test/regtest/rip_rsp_rflags.exp b/test/regtest/rip_rsp_rflags.exp
+index 9bd7d19..4de9577 100644
+--- a/test/regtest/rip_rsp_rflags.exp
++++ b/test/regtest/rip_rsp_rflags.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000c008000:0000000000004600: 41 57                   push %r15
+ 000000000a000108:000000000c007ff8:0000000000004600: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000c007ff8:0000000000004600: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000c007ff8:0000000000004600: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000c007ff8:0000000000004600: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000c007ff8:0000000000004600: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000c007ff8:0000000000004600: 74 02                   jz 0xa000122
+diff --git a/test/regtest/rip_to_rsp.exp b/test/regtest/rip_to_rsp.exp
+index b01e804..64e0033 100644
+--- a/test/regtest/rip_to_rsp.exp
++++ b/test/regtest/rip_to_rsp.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae
+ push %r15
+ js 0xa000106
+ movq 0x5e(%rip), %rax
+-mov $0x8877665544332211, %rbx
++mov $-0x778899aabbccddef, %rbx
+ cmp %rax, %rbx
+ jz 0xa000122
+ nop
+diff --git a/test/regtest/rotate.exp b/test/regtest/rotate.exp
+index 33ed619..6f55454 100644
+--- a/test/regtest/rotate.exp
++++ b/test/regtest/rotate.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae [000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E
+ push %r15 [000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:000000004F4F4F4F:0000000050505050:0000000061616161:0000000072727272:0000000083838383:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:]
+ js 0xa000106 [000000001C1C1C1C:000000003E3E3E3E:000000004F4F4F4F:0000000050505050:0000000061616161:0000000072727272:0000000083838383:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:]
+ movq 0x5e(%rip), %rax [000000003E3E3E3E:000000004F4F4F4F:0000000050505050:0000000061616161:0000000072727272:0000000083838383:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:]
+-mov $0x8877665544332211, %rbx [8877665544332211:0000000050505050:0000000061616161:0000000072727272:0000000083838383:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:]
++mov $-0x778899aabbccddef, %rbx [8877665544332211:0000000050505050:0000000061616161:0000000072727272:0000000083838383:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:]
+ cmp %rax, %rbx [0000000050505050:0000000061616161:0000000072727272:8877665544332211:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:8877665544332211:]
+ jz 0xa000122 [0000000061616161:0000000072727272:8877665544332211:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:8877665544332211:0000000050505050:]
+ ud2 [0000000072727272:8877665544332211:0000000094949494:00000000A5A5A5A5:00000000B6B6B6B6:00000000C7C7C7C7:00000000D8D8D8D8:00000000E9E9E9E9:000000000B0B0B0B:000000002D2D2D2D:000000001C1C1C1C:000000003E3E3E3E:8877665544332211:0000000050505050:0000000061616161:]
+diff --git a/test/regtest/skip.exp b/test/regtest/skip.exp
+index e792d93..02eaff7 100644
+--- a/test/regtest/skip.exp
++++ b/test/regtest/skip.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae # %rax=0x000000000b0b0b0b %rbx=0x000000003e3e3e3e
+ push %r15 # %rax=0x000000000b0b0b0b %rbx=0x000000003e3e3e3e
+ js 0xa000106 # %rax=0x000000000b0b0b0b %rbx=0x000000003e3e3e3e
+ movq 0x5e(%rip), %rax # %rax=0x000000000b0b0b0b %rbx=0x000000003e3e3e3e
+-mov $0x8877665544332211, %rbx # %rax=0x8877665544332211 %rbx=0x000000003e3e3e3e
++mov $-0x778899aabbccddef, %rbx # %rax=0x8877665544332211 %rbx=0x000000003e3e3e3e
+ cmp %rax, %rbx # %rax=0x8877665544332211 %rbx=0x8877665544332211
+ ud2 # %rax=0x8877665544332212 %rbx=0x8877665544332211
+ Illegal instruction
+diff --git a/test/regtest/src_dst.exp b/test/regtest/src_dst.exp
+index b0df8e5..a00d06a 100644
+--- a/test/regtest/src_dst.exp
++++ b/test/regtest/src_dst.exp
+@@ -1,5 +1,5 @@
+ 000000000a00010a:8877665544332211:000000000b0b0b0b: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:8877665544332211:000000003e3e3e3e: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:8877665544332211:000000003e3e3e3e: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a000140:8877665544332211:0000000072727272: 4c 8b 05 28 00 00 00    movq 0x28(%rip), %r8
+ 000000000a000147:00ffeeddccbbaa99:000000002d2d2d2d: 48 8b 0d 9a 01 00 00    movq 0x19a(%rip), %rcx
+diff --git a/test/regtest/static.exp b/test/regtest/static.exp
+index e07368d..dc47fe9 100644
+--- a/test/regtest/static.exp
++++ b/test/regtest/static.exp
+@@ -2,7 +2,7 @@
+ 000000000a000106:000000000a000106:0000000000000000: 41 57                   push %r15
+ 000000000a000108:000000000a000108:0000000000000000: 78 fc                   js 0xa000106
+ 000000000a00010a:000000000a00010a:0000000000000000: 48 8b 05 5e 00 00 00    movq 0x5e(%rip), %rax
+-000000000a000111:000000000a000111:0000000000000000: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++000000000a000111:000000000a000111:0000000000000000: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 000000000a00011b:000000000a00011b:0000000000000000: 48 39 c3                cmp %rax, %rbx
+ 000000000a00011e:000000000a00011e:0000000000000000: 74 02                   jz 0xa000122
+diff --git a/test/regtest/sum.exp b/test/regtest/sum.exp
+index 0e2e061..e8a07c7 100644
+--- a/test/regtest/sum.exp
++++ b/test/regtest/sum.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae # 185273099
+ push %r15 # 370546198
+ js 0xa000106 # 555819297
+ movq 0x5e(%rip), %rax # 741092396
+-mov $0x8877665544332211, %rbx # -8613303245179236803
++mov $-0x778899aabbccddef, %rbx # -8613303245179236803
+ cmp %rax, %rbx # 1220137582609985614
+ jz 0xa000122 # -7393165663310343585
+ nop # 2440275164478878832
+diff --git a/test/regtest/trunc32.exp b/test/regtest/trunc32.exp
+index 0b914fe..0832ba3 100644
+--- a/test/regtest/trunc32.exp
++++ b/test/regtest/trunc32.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae [0B0B0B0B:2D2D2D2D:1C1C1C1C:3E3E3E3E:4F4F4F4F:50505050:61616161:72
+ push %r15 [0B0B0B0B:2D2D2D2D:1C1C1C1C:3E3E3E3E:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+ js 0xa000106 [0B0B0B0B:2D2D2D2D:1C1C1C1C:3E3E3E3E:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+ movq 0x5e(%rip), %rax [44332211:2D2D2D2D:1C1C1C1C:3E3E3E3E:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+-mov $0x8877665544332211, %rbx [44332211:2D2D2D2D:1C1C1C1C:44332211:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
++mov $-0x778899aabbccddef, %rbx [44332211:2D2D2D2D:1C1C1C1C:44332211:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+ cmp %rax, %rbx [44332211:2D2D2D2D:1C1C1C1C:44332211:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+ nop [44332211:2D2D2D2D:1C1C1C1C:44332211:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+ nopl %eax, (%rax) [44332211:2D2D2D2D:1C1C1C1C:44332211:4F4F4F4F:50505050:61616161:72727272:83838383:94949494:A5A5A5A5:B6B6B6B6:C7C7C7C7:D8D8D8D8:E9E9E9E9:]
+diff --git a/test/regtest/types.exp b/test/regtest/types.exp
+index baa55e1..6d75a84 100644
+--- a/test/regtest/types.exp
++++ b/test/regtest/types.exp
+@@ -1,4 +1,4 @@
+-0000000000000016:000000000a000111:000000000a000111: 48 bb 11 22 33 44 55 66 mov $0x8877665544332211, %rbx
++0000000000000016:000000000a000111:000000000a000111: 48 bb 11 22 33 44 55 66 mov $-0x778899aabbccddef, %rbx
+                                                     77 88 
+ 0000000000000015:000000000a000133:000000000a000133: 83 fb 33                cmp $0x33, %ebx
+ 0000000000000014:000000000a000182:000000000a000182: 48 c7 c1 89 88 ff ff    mov $-0x7777, %rcx
+diff --git a/test/regtest/zero_flags.exp b/test/regtest/zero_flags.exp
+index 6ea2c37..ac678cc 100644
+--- a/test/regtest/zero_flags.exp
++++ b/test/regtest/zero_flags.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae	# ZERO FLAGS -Z-P-
+ push %r15	# ZERO FLAGS -----
+ js 0xa000106	# ZERO FLAGS -----
+ movq 0x5e(%rip), %rax	# ZERO FLAGS -----
+-mov $0x8877665544332211, %rbx	# ZERO FLAGS -----
++mov $-0x778899aabbccddef, %rbx	# ZERO FLAGS -----
+ cmp %rax, %rbx	# ZERO FLAGS -Z-P-
+ jz 0xa000122	# ZERO FLAGS -----
+ Illegal instruction
+diff --git a/test/regtest/zero_flags_2.exp b/test/regtest/zero_flags_2.exp
+index 6ea2c37..ac678cc 100644
+--- a/test/regtest/zero_flags_2.exp
++++ b/test/regtest/zero_flags_2.exp
+@@ -2,7 +2,7 @@ jnz 0xa0002ae	# ZERO FLAGS -Z-P-
+ push %r15	# ZERO FLAGS -----
+ js 0xa000106	# ZERO FLAGS -----
+ movq 0x5e(%rip), %rax	# ZERO FLAGS -----
+-mov $0x8877665544332211, %rbx	# ZERO FLAGS -----
++mov $-0x778899aabbccddef, %rbx	# ZERO FLAGS -----
+ cmp %rax, %rbx	# ZERO FLAGS -Z-P-
+ jz 0xa000122	# ZERO FLAGS -----
+ Illegal instruction