diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-06-08 22:51:23 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2010-06-08 22:51:23 +0000 |
commit | 99405df044f2c584242e711cc9023ec90356da82 (patch) | |
tree | bb4f1e4c609d5bf95ea1eaff57e9cf3d4a843ea8 /lib/Target/X86/X86InstrInfo.h | |
parent | 544153653b0bccf7ef42a00f68057a87932b47f4 (diff) | |
download | external_llvm-99405df044f2c584242e711cc9023ec90356da82.zip external_llvm-99405df044f2c584242e711cc9023ec90356da82.tar.gz external_llvm-99405df044f2c584242e711cc9023ec90356da82.tar.bz2 |
Reapply r105521, this time appending "LLU" to 64 bit
immediates to avoid breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrInfo.h')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h index f5c8022..9016c16 100644 --- a/lib/Target/X86/X86InstrInfo.h +++ b/lib/Target/X86/X86InstrInfo.h @@ -417,22 +417,36 @@ namespace X86II { OpcodeShift = 24, OpcodeMask = 0xFF << OpcodeShift + }; + // FIXME: The enum opcode space is over and more bits are needed. Anywhere + // those enums below are used, TSFlags must be shifted right by 32 first. + enum { + //===------------------------------------------------------------------===// + // VEX_4V - VEX prefixes are instruction prefixes used in AVX. + // VEX_4V is used to specify an additional AVX/SSE register. Several 2 + // address instructions in SSE are represented as 3 address ones in AVX + // and the additional register is encoded in VEX_VVVV prefix. + // + VEXShift = 0, + VEX_4V = 1 << VEXShift + }; + // getBaseOpcodeFor - This function returns the "base" X86 opcode for the // specified machine instruction. // - static inline unsigned char getBaseOpcodeFor(unsigned TSFlags) { + static inline unsigned char getBaseOpcodeFor(uint64_t TSFlags) { return TSFlags >> X86II::OpcodeShift; } - static inline bool hasImm(unsigned TSFlags) { + static inline bool hasImm(uint64_t TSFlags) { return (TSFlags & X86II::ImmMask) != 0; } /// getSizeOfImm - Decode the "size of immediate" field from the TSFlags field /// of the specified instruction. - static inline unsigned getSizeOfImm(unsigned TSFlags) { + static inline unsigned getSizeOfImm(uint64_t TSFlags) { switch (TSFlags & X86II::ImmMask) { default: assert(0 && "Unknown immediate size"); case X86II::Imm8: @@ -446,7 +460,7 @@ namespace X86II { /// isImmPCRel - Return true if the immediate of the specified instruction's /// TSFlags indicates that it is pc relative. - static inline unsigned isImmPCRel(unsigned TSFlags) { + static inline unsigned isImmPCRel(uint64_t TSFlags) { switch (TSFlags & X86II::ImmMask) { default: assert(0 && "Unknown immediate size"); case X86II::Imm8PCRel: |