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 13 namespace llvm { 14 isImmSExti16i8Value(uint64_t Value)15inline bool isImmSExti16i8Value(uint64_t Value) { 16 return (( Value <= 0x000000000000007FULL)|| 17 (0x000000000000FF80ULL <= Value && Value <= 0x000000000000FFFFULL)|| 18 (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL)); 19 } 20 isImmSExti32i8Value(uint64_t Value)21inline bool isImmSExti32i8Value(uint64_t Value) { 22 return (( Value <= 0x000000000000007FULL)|| 23 (0x00000000FFFFFF80ULL <= Value && Value <= 0x00000000FFFFFFFFULL)|| 24 (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL)); 25 } 26 isImmSExti64i8Value(uint64_t Value)27inline bool isImmSExti64i8Value(uint64_t Value) { 28 return (( Value <= 0x000000000000007FULL)|| 29 (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL)); 30 } 31 isImmSExti64i32Value(uint64_t Value)32inline bool isImmSExti64i32Value(uint64_t Value) { 33 return (( Value <= 0x000000007FFFFFFFULL)|| 34 (0xFFFFFFFF80000000ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL)); 35 } 36 isImmUnsignedi8Value(uint64_t Value)37inline bool isImmUnsignedi8Value(uint64_t Value) { 38 return (( Value <= 0x00000000000000FFULL)|| 39 (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL)); 40 } 41 42 } // End of namespace llvm 43 44 #endif 45