summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-02-26 16:34:07 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-26 16:34:07 -0800
commit943c9d74588c6606e497424761ab91d119b1e487 (patch)
treeb119566b9e0af147496b812ba0c3f8802b5f4348 /test
parentd6e133f00b2465a38d30eb98ffd70c4a94dae2d8 (diff)
downloadnasm-943c9d74588c6606e497424761ab91d119b1e487.tar.gz
nasm-943c9d74588c6606e497424761ab91d119b1e487.tar.bz2
nasm-943c9d74588c6606e497424761ab91d119b1e487.zip
optimization.asm: add sbyte tests
Diffstat (limited to 'test')
-rw-r--r--test/optimization.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/optimization.asm b/test/optimization.asm
index fcc209e..975938e 100644
--- a/test/optimization.asm
+++ b/test/optimization.asm
@@ -70,5 +70,23 @@ lea eax, [eax+galog2-galog1]
times 128 - 3 nop
galog2:
+; Sbyte tests...
+onetwentysix equ 126
+onetwentynine equ 129
+
+add eax,onetwentyseven ; sbyte (forward)
+add eax,onetwentyeight ; not sbyte (forward)
+add eax,onetwentyseven ; sbyte (forward)
+add eax,onetwentysix ; sbyte (backward)
+add eax,onetwentynine ; not sbyte (backward)
+add ecx,onetwentyseven ; sbyte (forward)
+add ecx,onetwentyeight ; not sbyte (forward)
+add ecx,onetwentyseven ; sbyte (forward)
+add ecx,onetwentysix ; sbyte (backward)
+add ecx,onetwentynine ; not sbyte (backward)
+
+onetwentyseven equ 127
+onetwentyeight equ 128
+
; Do not confuse forward references and segmentless addresses!
jmp 12345