13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AVR_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AVR_H
18#include "llvm/Support/Compiler.h"
19#include "llvm/TargetParser/Triple.h"
39 DefaultAlignForAttributeAligned = 8;
46 DoubleFormat = &llvm::APFloat::IEEEsingle();
49 LongDoubleFormat = &llvm::APFloat::IEEEsingle();
50 SizeType = UnsignedInt;
51 PtrDiffType = SignedInt;
52 IntPtrType = SignedInt;
53 Char16Type = UnsignedInt;
55 Int16Type = SignedInt;
56 Char32Type = UnsignedLong;
57 SigAtomicType = SignedChar;
58 resetDataLayout(
"e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8");
69 return TargetInfo::VoidPtrBuiltinVaList;
75 static const char *
const GCCRegNames[] = {
76 "r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
77 "r10",
"r11",
"r12",
"r13",
"r14",
"r15",
"r16",
"r17",
"r18",
"r19",
78 "r20",
"r21",
"r22",
"r23",
"r24",
"r25",
"X",
"Y",
"Z",
"SP"};
99 if (StringRef(Name).size() > 1)
161 return BitWidth == 16 ? (IsSigned ? SignedInt : UnsignedInt)
162 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned);
167 return BitWidth == 16
168 ? (IsSigned ? SignedInt : UnsignedInt)
169 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
172 bool isValidCPUName(StringRef Name)
const override;
174 bool setCPU(
const std::string &Name)
override;
175 std::optional<std::string> handleAsmEscapedChar(
char EscChar)
const override;
176 StringRef
getABI()
const override {
return ABI; }
179 return std::make_pair(32, 32);
187 int NumFlashBanks = 0;
Defines the clang::TargetOptions class.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Exposes information about the current target.
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Options for controlling the target.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
ArrayRef< const char * > getGCCRegNames() const override
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final
Return the smallest integer type with at least the specified width.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
StringRef getABI() const override
Get the ABI currently in use.
ArrayRef< TargetInfo::AddlRegName > getGCCAddlRegNames() const override
std::pair< unsigned, unsigned > hardwareInterferenceSizes() const override
The first value in the pair is the minimum offset between two objects to avoid false sharing (destruc...
IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final
Return integer type with specified width.
AVRTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
Defines the clang::TargetInfo interface.
const TargetInfo::AddlRegName AddlRegNames[]
The JSON file list parser is used to communicate input to InstallAPI.
void setRequiresImmediate(int Min, int Max)
IntType
===-— Target Data Type Query Methods ----------------------------—===//