1*fe6060f1SDimitry Andric //===--- M68k.h - Declare M68k target feature support -------*- C++ -*-===// 2*fe6060f1SDimitry Andric // 3*fe6060f1SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*fe6060f1SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*fe6060f1SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*fe6060f1SDimitry Andric // 7*fe6060f1SDimitry Andric //===----------------------------------------------------------------------===// 8*fe6060f1SDimitry Andric // 9*fe6060f1SDimitry Andric // This file declares M68k TargetInfo objects. 10*fe6060f1SDimitry Andric // 11*fe6060f1SDimitry Andric //===----------------------------------------------------------------------===// 12*fe6060f1SDimitry Andric 13*fe6060f1SDimitry Andric #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_M68K_H 14*fe6060f1SDimitry Andric #define LLVM_CLANG_LIB_BASIC_TARGETS_M68K_H 15*fe6060f1SDimitry Andric 16*fe6060f1SDimitry Andric #include "OSTargets.h" 17*fe6060f1SDimitry Andric #include "clang/Basic/TargetInfo.h" 18*fe6060f1SDimitry Andric #include "clang/Basic/TargetOptions.h" 19*fe6060f1SDimitry Andric #include "llvm/ADT/Triple.h" 20*fe6060f1SDimitry Andric #include "llvm/Support/Compiler.h" 21*fe6060f1SDimitry Andric 22*fe6060f1SDimitry Andric namespace clang { 23*fe6060f1SDimitry Andric namespace targets { 24*fe6060f1SDimitry Andric 25*fe6060f1SDimitry Andric class LLVM_LIBRARY_VISIBILITY M68kTargetInfo : public TargetInfo { 26*fe6060f1SDimitry Andric static const char *const GCCRegNames[]; 27*fe6060f1SDimitry Andric 28*fe6060f1SDimitry Andric enum CPUKind { 29*fe6060f1SDimitry Andric CK_Unknown, 30*fe6060f1SDimitry Andric CK_68000, 31*fe6060f1SDimitry Andric CK_68010, 32*fe6060f1SDimitry Andric CK_68020, 33*fe6060f1SDimitry Andric CK_68030, 34*fe6060f1SDimitry Andric CK_68040, 35*fe6060f1SDimitry Andric CK_68060 36*fe6060f1SDimitry Andric } CPU = CK_Unknown; 37*fe6060f1SDimitry Andric 38*fe6060f1SDimitry Andric public: 39*fe6060f1SDimitry Andric M68kTargetInfo(const llvm::Triple &Triple, const TargetOptions &); 40*fe6060f1SDimitry Andric 41*fe6060f1SDimitry Andric void getTargetDefines(const LangOptions &Opts, 42*fe6060f1SDimitry Andric MacroBuilder &Builder) const override; 43*fe6060f1SDimitry Andric ArrayRef<Builtin::Info> getTargetBuiltins() const override; 44*fe6060f1SDimitry Andric bool hasFeature(StringRef Feature) const override; 45*fe6060f1SDimitry Andric ArrayRef<const char *> getGCCRegNames() const override; 46*fe6060f1SDimitry Andric ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const override; 47*fe6060f1SDimitry Andric std::string convertConstraint(const char *&Constraint) const override; 48*fe6060f1SDimitry Andric bool validateAsmConstraint(const char *&Name, 49*fe6060f1SDimitry Andric TargetInfo::ConstraintInfo &info) const override; 50*fe6060f1SDimitry Andric llvm::Optional<std::string> handleAsmEscapedChar(char EscChar) const override; 51*fe6060f1SDimitry Andric const char *getClobbers() const override; 52*fe6060f1SDimitry Andric BuiltinVaListKind getBuiltinVaListKind() const override; 53*fe6060f1SDimitry Andric bool setCPU(const std::string &Name) override; 54*fe6060f1SDimitry Andric }; 55*fe6060f1SDimitry Andric 56*fe6060f1SDimitry Andric } // namespace targets 57*fe6060f1SDimitry Andric } // namespace clang 58*fe6060f1SDimitry Andric 59*fe6060f1SDimitry Andric #endif 60