LLVM API Documentation

X86AsmParserCommon.h
Go to the documentation of this file.
00001 //===-- X86AsmParserCommon.h - Common functions for X86AsmParser ---------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
00011 #define LLVM_LIB_TARGET_X86_ASMPARSER_X86ASMPARSERCOMMON_H
00012 
00013 namespace llvm {
00014 
00015 inline bool isImmSExti16i8Value(uint64_t Value) {
00016   return ((                                  Value <= 0x000000000000007FULL)||
00017           (0x000000000000FF80ULL <= Value && Value <= 0x000000000000FFFFULL)||
00018           (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL));
00019 }
00020 
00021 inline bool isImmSExti32i8Value(uint64_t Value) {
00022   return ((                                  Value <= 0x000000000000007FULL)||
00023           (0x00000000FFFFFF80ULL <= Value && Value <= 0x00000000FFFFFFFFULL)||
00024           (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL));
00025 }
00026 
00027 inline bool isImmSExti64i8Value(uint64_t Value) {
00028   return ((                                  Value <= 0x000000000000007FULL)||
00029           (0xFFFFFFFFFFFFFF80ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL));
00030 }
00031 
00032 inline bool isImmSExti64i32Value(uint64_t Value) {
00033   return ((                                  Value <= 0x000000007FFFFFFFULL)||
00034           (0xFFFFFFFF80000000ULL <= Value && Value <= 0xFFFFFFFFFFFFFFFFULL));
00035 }
00036 
00037 } // End of namespace llvm
00038 
00039 #endif