diff options
| author | Michael Matz <matz@suse.de> | 2016-05-16 05:10:21 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-05-16 05:10:21 +0200 |
| commit | f2a4cb0a0edc95ae74816275e82b4ade71c6f37a (patch) | |
| tree | eaae6cc045f5d4271dd9778cbdb0b222b2c1470e /tests/asmtest.S | |
| parent | 0f36f60faa05da7e250a4b4eebd4b534e8a2b537 (diff) | |
| download | tinycc-f2a4cb0a0edc95ae74816275e82b4ade71c6f37a.tar.gz tinycc-f2a4cb0a0edc95ae74816275e82b4ade71c6f37a.tar.bz2 | |
x86-asm: Reject some invalid arith imm8 instruction
There were two errors in the arithmetic imm8 instruction. They accept
only REGW, and in case the user write a xxxb opcode that variant
needs to be rejected as well (it's not automatically rejected by REGW
in case the destination is memory).
Diffstat (limited to 'tests/asmtest.S')
| -rw-r--r-- | tests/asmtest.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/asmtest.S b/tests/asmtest.S index a221126..fd0629c 100644 --- a/tests/asmtest.S +++ b/tests/asmtest.S @@ -158,6 +158,22 @@ addl $0x123, %eax add $0x123, %ebx add $-16, %ecx add $-0x123, %esi +add $1, %bx +add $1, %ebx +add $-1, %bx +add $-1, %ebx +add $127, %bx +addl $127, %ebx +addl $-128, %ebx +addl $-128, %ebx +addl $-129, %ebx +addl $128, %ebx +addl $255, %ebx +addl $256, %ebx +andb $0xf, %ah +andb $-15, %cl +xorb $127, %dh +cmpb $42, (%eax) addl $0x123, 0x100 addl $0x123, 0x100(%ebx) addl $0x123, 0x100(%ebx,%edx,2) |
