diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-10-06 23:40:31 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-06 23:40:31 -0700 |
commit | c1377e9a98dd5ca6f7900c048df5d346d1733d05 (patch) | |
tree | bb8b66a023c6e2106d2492cbc7ac9ba486ac6d03 /test/immwarn.asm | |
parent | 94cacf8ea9a7c2741f1fef6091d7e5fded7454fe (diff) | |
download | nasm-c1377e9a98dd5ca6f7900c048df5d346d1733d05.tar.gz |
New opcodes to deal with 8-bit immediate sign extended to opsize
New opcodes to deal with 8-bit immediates which are then sign-extended
to the operand size. These allow us to warn appropriately.
Not sure I'm using these in all the proper places; need audit of all
uses of the \14..\17 opcodes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test/immwarn.asm')
-rw-r--r-- | test/immwarn.asm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/immwarn.asm b/test/immwarn.asm index 3fc01c71..4b67676f 100644 --- a/test/immwarn.asm +++ b/test/immwarn.asm @@ -14,14 +14,14 @@ %endif push -1 push 0ffffh - push byte 0FFFFh ; XXX - inappropriate + push byte 0FFFFh add ax,0FFFFh %if WARN add ax,0FFFFFFFFh %endif add ax,-1 - add ax,byte 0FFFFh ; XXX - inappropriate + add ax,byte 0FFFFh %if WARN add ax,byte 0FFFFFFFFh %endif @@ -32,7 +32,7 @@ add cx,0FFFFFFFFh %endif add cx,-1 - add cx,byte 0FFFFh ; XXX - inappropriate + add cx,byte 0FFFFh %if WARN add cx,byte 0FFFFFFFFh %endif @@ -87,4 +87,3 @@ push byte 0ffffffffh %endif push byte -1 - |