1 //===-- X86AsmParserCommon.h - Common functions for X86AsmParser ---------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
11 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
15 inline bool isImmSExti16i8Value(uint64_t Value) {
16 return isInt<8>(Value) ||
17 (isUInt<16>(Value) && isInt<8>(static_cast<int16_t>(Value)));
20 inline bool isImmSExti32i8Value(uint64_t Value) {
21 return isInt<8>(Value) ||
22 (isUInt<32>(Value) && isInt<8>(static_cast<int32_t>(Value)));
25 inline bool isImmSExti64i8Value(uint64_t Value) {
26 return isInt<8>(Value);
29 inline bool isImmSExti64i32Value(uint64_t Value) {
30 return isInt<32>(Value);
33 inline bool isImmUnsignedi8Value(uint64_t Value) {
34 return isUInt<8>(Value) || isInt<8>(Value);
37 } // End of namespace llvm