/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Basic/Targets/XCore.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===--- XCore.h - Declare XCore target feature support ---------*- C++ -*-===// |
2 | | // |
3 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | | // See https://llvm.org/LICENSE.txt for license information. |
5 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | // |
9 | | // This file declares XCore TargetInfo objects. |
10 | | // |
11 | | //===----------------------------------------------------------------------===// |
12 | | |
13 | | #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_XCORE_H |
14 | | #define LLVM_CLANG_LIB_BASIC_TARGETS_XCORE_H |
15 | | |
16 | | #include "clang/Basic/TargetInfo.h" |
17 | | #include "clang/Basic/TargetOptions.h" |
18 | | #include "llvm/ADT/Triple.h" |
19 | | #include "llvm/Support/Compiler.h" |
20 | | |
21 | | namespace clang { |
22 | | namespace targets { |
23 | | |
24 | | class LLVM_LIBRARY_VISIBILITY XCoreTargetInfo : public TargetInfo { |
25 | | static const Builtin::Info BuiltinInfo[]; |
26 | | |
27 | | public: |
28 | | XCoreTargetInfo(const llvm::Triple &Triple, const TargetOptions &) |
29 | 18 | : TargetInfo(Triple) { |
30 | 18 | NoAsmVariants = true; |
31 | 18 | LongLongAlign = 32; |
32 | 18 | SuitableAlign = 32; |
33 | 18 | DoubleAlign = LongDoubleAlign = 32; |
34 | 18 | SizeType = UnsignedInt; |
35 | 18 | PtrDiffType = SignedInt; |
36 | 18 | IntPtrType = SignedInt; |
37 | 18 | WCharType = UnsignedChar; |
38 | 18 | WIntType = UnsignedInt; |
39 | 18 | UseZeroLengthBitfieldAlignment = true; |
40 | 18 | resetDataLayout("e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32" |
41 | 18 | "-f64:32-a:0:32-n32"); |
42 | 18 | } clang::targets::XCoreTargetInfo::XCoreTargetInfo(llvm::Triple const&, clang::TargetOptions const&) Line | Count | Source | 29 | 18 | : TargetInfo(Triple) { | 30 | 18 | NoAsmVariants = true; | 31 | 18 | LongLongAlign = 32; | 32 | 18 | SuitableAlign = 32; | 33 | 18 | DoubleAlign = LongDoubleAlign = 32; | 34 | 18 | SizeType = UnsignedInt; | 35 | 18 | PtrDiffType = SignedInt; | 36 | 18 | IntPtrType = SignedInt; | 37 | 18 | WCharType = UnsignedChar; | 38 | 18 | WIntType = UnsignedInt; | 39 | 18 | UseZeroLengthBitfieldAlignment = true; | 40 | 18 | resetDataLayout("e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32" | 41 | 18 | "-f64:32-a:0:32-n32"); | 42 | 18 | } |
Unexecuted instantiation: clang::targets::XCoreTargetInfo::XCoreTargetInfo(llvm::Triple const&, clang::TargetOptions const&) |
43 | | |
44 | | void getTargetDefines(const LangOptions &Opts, |
45 | | MacroBuilder &Builder) const override; |
46 | | |
47 | | ArrayRef<Builtin::Info> getTargetBuiltins() const override; |
48 | | |
49 | 15 | BuiltinVaListKind getBuiltinVaListKind() const override { |
50 | 15 | return TargetInfo::VoidPtrBuiltinVaList; |
51 | 15 | } |
52 | | |
53 | 0 | const char *getClobbers() const override { return ""; } |
54 | | |
55 | 0 | ArrayRef<const char *> getGCCRegNames() const override { |
56 | 0 | static const char *const GCCRegNames[] = { |
57 | 0 | "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
58 | 0 | "r8", "r9", "r10", "r11", "cp", "dp", "sp", "lr" |
59 | 0 | }; |
60 | 0 | return llvm::makeArrayRef(GCCRegNames); |
61 | 0 | } |
62 | | |
63 | 0 | ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const override { |
64 | 0 | return None; |
65 | 0 | } |
66 | | |
67 | | bool validateAsmConstraint(const char *&Name, |
68 | 0 | TargetInfo::ConstraintInfo &Info) const override { |
69 | 0 | return false; |
70 | 0 | } |
71 | | |
72 | 0 | int getEHDataRegisterNumber(unsigned RegNo) const override { |
73 | | // R0=ExceptionPointerRegister R1=ExceptionSelectorRegister |
74 | 0 | return (RegNo < 2) ? RegNo : -1; |
75 | 0 | } |
76 | | |
77 | 12 | bool allowsLargerPreferedTypeAlignment() const override { return false; } |
78 | | |
79 | 10 | bool hasBitIntType() const override { return true; } |
80 | | }; |
81 | | } // namespace targets |
82 | | } // namespace clang |
83 | | #endif // LLVM_CLANG_LIB_BASIC_TARGETS_XCORE_H |