summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-16 13:03:40 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-16 13:03:40 -0700
commitd41e07bd2e2cca759b976b0e796dc6917495b59b (patch)
treeafb283c1da28380bd796a9898e2ca56a60cbfe76
parent779ed8bcfd4631604aadbff625e8d148a1566091 (diff)
downloadnasm-d41e07bd2e2cca759b976b0e796dc6917495b59b.tar.gz
Test for BR 2172659
Test for the bug fix for BR 2172659 (invalid byte-sized immediates.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--test/andbyte.asm15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/andbyte.asm b/test/andbyte.asm
new file mode 100644
index 00000000..3d3b1c1a
--- /dev/null
+++ b/test/andbyte.asm
@@ -0,0 +1,15 @@
+;Testname=test; Arguments=-fbin -oandbyte.bin; Files=stdout stderr andbyte.bin
+;Testname=otest; Arguments=-Ox -fbin -oandbyte.bin; Files=stdout stderr andbyte.bin
+
+ bits 16
+
+ add sp, byte -0x10
+ add sp, -0x10
+ adc sp, byte -0x10
+ adc sp, -0x10
+ and sp, byte -0x10
+ and sp, -0x10
+ sbb sp, byte -0x10
+ sbb sp, -0x10
+ sub sp, byte -0x10
+ sub sp, -0x10