forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily revert the code part of D100981 "Delete le32/le64 targets"
This partially reverts commit 77ac823. Halide uses le32/le64 (halide/Halide#5934). Temporarily brings back the code part to give them some time for migration.
- Loading branch information
Showing
11 changed files
with
156 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//===--- Le64.cpp - Implement Le64 target feature support -----------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file implements Le64 TargetInfo objects. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "Le64.h" | ||
#include "Targets.h" | ||
#include "clang/Basic/Builtins.h" | ||
#include "clang/Basic/MacroBuilder.h" | ||
#include "clang/Basic/TargetBuiltins.h" | ||
|
||
using namespace clang; | ||
using namespace clang::targets; | ||
|
||
const Builtin::Info Le64TargetInfo::BuiltinInfo[] = { | ||
#define BUILTIN(ID, TYPE, ATTRS) \ | ||
{#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr}, | ||
#include "clang/Basic/BuiltinsLe64.def" | ||
}; | ||
|
||
ArrayRef<Builtin::Info> Le64TargetInfo::getTargetBuiltins() const { | ||
return {}; | ||
} | ||
|
||
void Le64TargetInfo::getTargetDefines(const LangOptions &Opts, | ||
MacroBuilder &Builder) const { | ||
DefineStd(Builder, "unix", Opts); | ||
defineCPUMacros(Builder, "le64", /*Tuning=*/false); | ||
Builder.defineMacro("__ELF__"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
//===--- Le64.h - Declare Le64 target feature support -----------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file declares Le64 TargetInfo objects. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H | ||
#define LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H | ||
|
||
#include "clang/Basic/TargetInfo.h" | ||
#include "clang/Basic/TargetOptions.h" | ||
#include "llvm/ADT/Triple.h" | ||
#include "llvm/Support/Compiler.h" | ||
|
||
namespace clang { | ||
namespace targets { | ||
|
||
class LLVM_LIBRARY_VISIBILITY Le64TargetInfo : public TargetInfo { | ||
static const Builtin::Info BuiltinInfo[]; | ||
|
||
public: | ||
Le64TargetInfo(const llvm::Triple &Triple, const TargetOptions &) | ||
: TargetInfo(Triple) { | ||
NoAsmVariants = true; | ||
LongWidth = LongAlign = PointerWidth = PointerAlign = 64; | ||
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; | ||
resetDataLayout("e-m:e-v128:32-v16:16-v32:32-v96:32-n8:16:32:64-S128"); | ||
} | ||
|
||
void getTargetDefines(const LangOptions &Opts, | ||
MacroBuilder &Builder) const override; | ||
|
||
ArrayRef<Builtin::Info> getTargetBuiltins() const override; | ||
|
||
BuiltinVaListKind getBuiltinVaListKind() const override { | ||
return TargetInfo::PNaClABIBuiltinVaList; | ||
} | ||
|
||
const char *getClobbers() const override { return ""; } | ||
|
||
ArrayRef<const char *> getGCCRegNames() const override { return None; } | ||
|
||
ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const override { | ||
return None; | ||
} | ||
|
||
bool validateAsmConstraint(const char *&Name, | ||
TargetInfo::ConstraintInfo &Info) const override { | ||
return false; | ||
} | ||
|
||
bool hasProtectedVisibility() const override { return false; } | ||
}; | ||
|
||
} // namespace targets | ||
} // namespace clang | ||
#endif // LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters