15#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_XTENSA_H
16#define LLVM_CLANG_LIB_BASIC_TARGETS_XTENSA_H
20#include "llvm/ADT/StringSwitch.h"
21#include "llvm/Support/Compiler.h"
22#include "llvm/TargetParser/Triple.h"
45 DoubleAlign = LongDoubleAlign = 64;
46 SizeType = UnsignedInt;
47 PtrDiffType = SignedInt;
48 IntPtrType = SignedInt;
49 WCharType = SignedInt;
50 WIntType = UnsignedInt;
51 UseZeroLengthBitfieldAlignment =
true;
52 MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
53 resetDataLayout(
"e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32");
64 return TargetInfo::XtensaABIBuiltinVaList;
70 static const char *
const GCCRegNames[] = {
72 "a0",
"sp",
"a1",
"a2",
"a3",
"a4",
"a5",
"a6",
"a7",
"a8",
"a9",
"a10",
73 "a11",
"a12",
"a13",
"a14",
"a15",
96 return (RegNo < 2) ? RegNo : -1;
100 return llvm::StringSwitch<bool>(Name).Case(
"generic",
true).Default(
false);
103 bool setCPU(
const std::string &Name)
override {
105 return isValidCPUName(Name);
static constexpr Builtin::Info BuiltinInfo[]
Defines enum values for all the target-independent builtin functions.
Defines the clang::MacroBuilder utility class.
Enumerates target-specific builtins in their own namespaces within namespace clang.
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.
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
XtensaTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
ArrayRef< const char * > getGCCRegNames() const override
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
bool setCPU(const std::string &Name) override
Target the specified CPU.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
int getEHDataRegisterNumber(unsigned RegNo) const override
Return the register number that __builtin_eh_return_regno would return with the specified argument.
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.