LLVM  8.0.1
X86AsmParserCommon.h
Go to the documentation of this file.
1 //===-- X86AsmParserCommon.h - Common functions for X86AsmParser ---------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
11 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
12 
14 
15 namespace llvm {
16 
17 inline bool isImmSExti16i8Value(uint64_t Value) {
18  return isInt<8>(Value) ||
19  (isUInt<16>(Value) && isInt<8>(static_cast<int16_t>(Value)));
20 }
21 
22 inline bool isImmSExti32i8Value(uint64_t Value) {
23  return isInt<8>(Value) ||
24  (isUInt<32>(Value) && isInt<8>(static_cast<int32_t>(Value)));
25 }
26 
27 inline bool isImmSExti64i8Value(uint64_t Value) {
28  return isInt<8>(Value);
29 }
30 
31 inline bool isImmSExti64i32Value(uint64_t Value) {
32  return isInt<32>(Value);
33 }
34 
35 inline bool isImmUnsignedi8Value(uint64_t Value) {
36  return isUInt<8>(Value) || isInt<8>(Value);
37 }
38 
39 } // End of namespace llvm
40 
41 #endif
constexpr bool isUInt< 32 >(uint64_t x)
Definition: MathExtras.h:349
This class represents lattice values for constants.
Definition: AllocatorList.h:24
bool isImmUnsignedi8Value(uint64_t Value)
constexpr bool isInt< 8 >(int64_t x)
Definition: MathExtras.h:303
bool isImmSExti64i8Value(uint64_t Value)
bool isImmSExti64i32Value(uint64_t Value)
bool isImmSExti16i8Value(uint64_t Value)
constexpr bool isUInt< 8 >(uint64_t x)
Definition: MathExtras.h:343
constexpr bool isInt< 32 >(int64_t x)
Definition: MathExtras.h:309
constexpr bool isUInt< 16 >(uint64_t x)
Definition: MathExtras.h:346
LLVM Value Representation.
Definition: Value.h:73
bool isImmSExti32i8Value(uint64_t Value)