Commit Graph

7 Commits

Author SHA1 Message Date
H. Peter Anvin
588df78b0d New opcode for 32->64 bit sign-extended immediate with warning
Add a new opcode for 32->64 bit sign-extended immediate, with warning
on the number not matching.

This unfortunately calls for an audit of all the \4[0123] opcodes, if
they should be replaced by \25[4567].  This only replaces one
instruction (MOV reg64,imm32); other instructions need to be
considered.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-07 10:05:10 -07:00
H. Peter Anvin
f70fce6cc9 test/immwarn.asm: add a few more non-warning tests
A few non-warning conditions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-07 09:59:18 -07:00
H. Peter Anvin
98a22a65c0 Avoid double warning for signed dword immediate
Avoid double warning for the case where a signed dword immediate is
incorrectly extended to 64 bits.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-06 23:49:01 -07:00
H. Peter Anvin
c1377e9a98 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>
2008-10-06 23:40:31 -07:00
H. Peter Anvin
a9ed99bddf immwarn: more immediate warnings test, with notes of where we fail
More tests for immediate warnings, with notes for the ones where we
currently fail to do the right thing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-06 18:49:00 -07:00
H. Peter Anvin
733cbb3197 test: change .stdout/.stderr to stdout/stderr
Using hidden files are rather antisocial, and rather pointless in this
particular context.  Change .stdout and .stderr to simply stdout and
stderr.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-06 18:28:42 -07:00
H. Peter Anvin
9ac2b843b4 test/immwarn.asm: new test for immediate warnings
Test for various conditions that should or should not generate
immediate warnings.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-05 19:41:32 -07:00