Path: blob/main/contrib/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h
35294 views
//===-- X86AsmParserCommon.h - Common functions for X86AsmParser ---------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H9#define LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H1011#include "llvm/Support/MathExtras.h"1213namespace llvm {1415inline bool isImmSExti16i8Value(uint64_t Value) {16return isInt<8>(Value) ||17(isUInt<16>(Value) && isInt<8>(static_cast<int16_t>(Value)));18}1920inline bool isImmSExti32i8Value(uint64_t Value) {21return isInt<8>(Value) ||22(isUInt<32>(Value) && isInt<8>(static_cast<int32_t>(Value)));23}2425inline bool isImmSExti64i8Value(uint64_t Value) {26return isInt<8>(Value);27}2829inline bool isImmSExti64i32Value(uint64_t Value) {30return isInt<32>(Value);31}3233inline bool isImmUnsignedi8Value(uint64_t Value) {34return isUInt<8>(Value) || isInt<8>(Value);35}3637inline bool isImmUnsignedi4Value(uint64_t Value) {38return isUInt<4>(Value);39}4041} // End of namespace llvm4243#endif444546