diff options
author | Kevin Enderby <enderby@apple.com> | 2011-07-27 23:01:50 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2011-07-27 23:01:50 +0000 |
commit | c37d4bbf1f33c5e4b1c2f1bf1a6e2cae2ae5603a (patch) | |
tree | fcbda9c4873cb87eeb09ba0f65e1eaf73b3387bf /utils/TableGen/X86RecognizableInstr.cpp | |
parent | fc2eb31a3c054f9611a2e88238fbb5a8842064a6 (diff) | |
download | llvm-c37d4bbf1f33c5e4b1c2f1bf1a6e2cae2ae5603a.tar.gz llvm-c37d4bbf1f33c5e4b1c2f1bf1a6e2cae2ae5603a.tar.bz2 llvm-c37d4bbf1f33c5e4b1c2f1bf1a6e2cae2ae5603a.tar.xz |
Fix llvm-mc handing of x86 instructions that take 8-bit unsigned immediates.
llvm-mc gives an "invalid operand" error for instructions that take an unsigned
immediate which have the high bit set such as:
pblendw $0xc5, %xmm2, %xmm1
llvm-mc treats all x86 immediates as signed values and range checks them.
A small number of x86 instructions use the imm8 field as a set of bits.
This change only changes those instructions and where the high bit is not
ignored. The others remain unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/X86RecognizableInstr.cpp')
-rw-r--r-- | utils/TableGen/X86RecognizableInstr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/X86RecognizableInstr.cpp b/utils/TableGen/X86RecognizableInstr.cpp index ea3bb700b2..3071d8e274 100644 --- a/utils/TableGen/X86RecognizableInstr.cpp +++ b/utils/TableGen/X86RecognizableInstr.cpp @@ -984,6 +984,7 @@ OperandType RecognizableInstr::typeFromString(const std::string &s, TYPE("i32mem", TYPE_Mv) TYPE("i32imm", TYPE_IMMv) TYPE("i32i8imm", TYPE_IMM32) + TYPE("u32u8imm", TYPE_IMM32) TYPE("GR32", TYPE_Rv) TYPE("i64mem", TYPE_Mv) TYPE("i64i32imm", TYPE_IMM64) @@ -1044,6 +1045,7 @@ OperandEncoding RecognizableInstr::immediateEncodingFromString ENCODING("i16imm", ENCODING_IW) } ENCODING("i32i8imm", ENCODING_IB) + ENCODING("u32u8imm", ENCODING_IB) ENCODING("SSECC", ENCODING_IB) ENCODING("i16imm", ENCODING_Iv) ENCODING("i16i8imm", ENCODING_IB) |