summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVictor van den Elzen <victor.vde@gmail.com>2010-12-29 17:13:38 +0000
committerVictor van den Elzen <victor.vde@gmail.com>2010-12-29 18:13:38 +0100
commit6dfbddb6b071625066079fdf77fa7b8482aa6da3 (patch)
tree95dd7ab0d194b4c37cda8692e18bed4292507a99 /test
parent47c95ceed447fff457f898bcea4facfbf9a2f710 (diff)
downloadnasm-6dfbddb6b071625066079fdf77fa7b8482aa6da3.tar.gz
nasm-6dfbddb6b071625066079fdf77fa7b8482aa6da3.tar.bz2
nasm-6dfbddb6b071625066079fdf77fa7b8482aa6da3.zip
Move implicit operand size override logic to calc_size
It is more logical, it cleans up the code and it makes implicit operand size override prefixes come out in the same order as explicit ones instead of after all other prefixes. Suggested-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test')
-rw-r--r--test/br3058845.asm2
-rw-r--r--test/prefix66.asm28
2 files changed, 29 insertions, 1 deletions
diff --git a/test/br3058845.asm b/test/br3058845.asm
index b0de560..c42f5d5 100644
--- a/test/br3058845.asm
+++ b/test/br3058845.asm
@@ -11,4 +11,4 @@ cmp eax, 0xFFFF_FFFF
BITS 64
cmp ax, 0xFFFF
-cmp eax, 0xFFFF_FFFF ; shouldn't warn, but does currently
+cmp eax, 0xFFFF_FFFF
diff --git a/test/prefix66.asm b/test/prefix66.asm
new file mode 100644
index 0000000..4d9eb00
--- /dev/null
+++ b/test/prefix66.asm
@@ -0,0 +1,28 @@
+;Testname=test; Arguments=-fbin -oprefix66.bin; Files=stdout stderr prefix66.bin
+
+BITS 16
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1
+
+BITS 32
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1
+
+BITS 64
+cmp ax, 1
+o16 cmp ax, 1
+o32 cmp ax, 1
+
+cmp eax, 1
+o16 cmp eax, 1
+o32 cmp eax, 1