/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h
Line | Count | Source |
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 | | #include "llvm/Support/MathExtras.h" |
14 | | |
15 | | namespace llvm { |
16 | | |
17 | 745 | inline bool isImmSExti16i8Value(uint64_t Value) { |
18 | 745 | return isInt<8>(Value) || |
19 | 499 | (isUInt<16>(Value) && 499 isInt<8>(static_cast<int16_t>(Value))497 ); |
20 | 745 | } |
21 | | |
22 | 1.34k | inline bool isImmSExti32i8Value(uint64_t Value) { |
23 | 1.34k | return isInt<8>(Value) || |
24 | 856 | (isUInt<32>(Value) && 856 isInt<8>(static_cast<int32_t>(Value))855 ); |
25 | 1.34k | } |
26 | | |
27 | 641 | inline bool isImmSExti64i8Value(uint64_t Value) { |
28 | 641 | return isInt<8>(Value); |
29 | 641 | } |
30 | | |
31 | 467 | inline bool isImmSExti64i32Value(uint64_t Value) { |
32 | 467 | return isInt<32>(Value); |
33 | 467 | } |
34 | | |
35 | 21.3k | inline bool isImmUnsignedi8Value(uint64_t Value) { |
36 | 30 | return isUInt<8>(Value) || isInt<8>(Value); |
37 | 21.3k | } |
38 | | |
39 | | } // End of namespace llvm |
40 | | |
41 | | #endif |