-
- Downloads
x86: restrict insn templates accepting negative 8-bit immediates
For shifts (but not ordinary rotates) and other cases where an immediate describes e.g. a bit count or position, allowing negative operands is at best confusing. An extreme example would be the two rotate-through-carry insns, where a negative value would _not_ mean rotating the corresponding number of bits in the other direction. To refuse such, give meaning to the combination of Imm8 and Imm8S in templates (so far these weren't used together anywhere). The issue was with smallest_imm_type() blindly setting .imm8 for signed numbers determined to fit in a byte. VPROT{B,W,D,Q} is a little special: The rotate count there is a signed quantity, so Imm8 is replaced by Imm8S. Adjust affected testcases accordingly as well. Another small adjustment to the testsuite is necessary: AAM and AAD were never sensible to use with 0xffffff90 operands. This should have been an error.
Showing
- gas/config/tc-i386.c 15 additions, 1 deletiongas/config/tc-i386.c
- gas/testsuite/gas/i386/intel.s 2 additions, 2 deletionsgas/testsuite/gas/i386/intel.s
- gas/testsuite/gas/i386/opcode.s 2 additions, 2 deletionsgas/testsuite/gas/i386/opcode.s
- gas/testsuite/gas/i386/x86-64-xop.s 22 additions, 22 deletionsgas/testsuite/gas/i386/x86-64-xop.s
- gas/testsuite/gas/i386/xop.s 25 additions, 25 deletionsgas/testsuite/gas/i386/xop.s
- opcodes/i386-opc.tbl 58 additions, 58 deletionsopcodes/i386-opc.tbl
- opcodes/i386-tbl.h 96 additions, 96 deletionsopcodes/i386-tbl.h
Loading
Please register or sign in to comment