LLVM  14.0.0git
X86AsmParserCommon.h
Go to the documentation of this file.
1 //===-- X86AsmParserCommon.h - Common functions for X86AsmParser ---------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
10 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
11 
13 
14 namespace llvm {
15 
17  return isInt<8>(Value) ||
18  (isUInt<16>(Value) && isInt<8>(static_cast<int16_t>(Value)));
19 }
20 
22  return isInt<8>(Value) ||
23  (isUInt<32>(Value) && isInt<8>(static_cast<int32_t>(Value)));
24 }
25 
27  return isInt<8>(Value);
28 }
29 
31  return isInt<32>(Value);
32 }
33 
35  return isUInt<8>(Value) || isInt<8>(Value);
36 }
37 
39  return isUInt<4>(Value);
40 }
41 
42 } // End of namespace llvm
43 
44 #endif
MathExtras.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::isImmUnsignedi4Value
bool isImmUnsignedi4Value(uint64_t Value)
Definition: X86AsmParserCommon.h:38
llvm::isImmSExti32i8Value
bool isImmSExti32i8Value(uint64_t Value)
Definition: X86AsmParserCommon.h:21
llvm::isImmSExti64i8Value
bool isImmSExti64i8Value(uint64_t Value)
Definition: X86AsmParserCommon.h:26
llvm::isImmUnsignedi8Value
bool isImmUnsignedi8Value(uint64_t Value)
Definition: X86AsmParserCommon.h:34
llvm::isInt< 8 >
constexpr bool isInt< 8 >(int64_t x)
Definition: MathExtras.h:367
llvm::isImmSExti16i8Value
bool isImmSExti16i8Value(uint64_t Value)
Definition: X86AsmParserCommon.h:16
llvm::isInt< 32 >
constexpr bool isInt< 32 >(int64_t x)
Definition: MathExtras.h:373
llvm::isUInt< 16 >
constexpr bool isUInt< 16 >(uint64_t x)
Definition: MathExtras.h:408
uint64_t
llvm::isUInt< 32 >
constexpr bool isUInt< 32 >(uint64_t x)
Definition: MathExtras.h:411
llvm::isUInt< 8 >
constexpr bool isUInt< 8 >(uint64_t x)
Definition: MathExtras.h:405
llvm::isImmSExti64i32Value
bool isImmSExti64i32Value(uint64_t Value)
Definition: X86AsmParserCommon.h:30
llvm::Value
LLVM Value Representation.
Definition: Value.h:75