2014-05-24 20:50:23 +08:00
|
|
|
//===-- AArch64TargetInfo.cpp - AArch64 Target Implementation -----------------===//
|
2014-03-29 18:18:08 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2014-03-29 18:18:08 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-05-15 05:33:53 +08:00
|
|
|
#include "TargetInfo/AArch64TargetInfo.h"
|
2014-03-29 18:18:08 +08:00
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
2019-05-15 05:33:53 +08:00
|
|
|
|
2014-03-29 18:18:08 +08:00
|
|
|
using namespace llvm;
|
2019-05-15 05:33:53 +08:00
|
|
|
Target &llvm::getTheAArch64leTarget() {
|
2016-10-10 07:00:34 +08:00
|
|
|
static Target TheAArch64leTarget;
|
|
|
|
return TheAArch64leTarget;
|
|
|
|
}
|
2019-05-15 05:33:53 +08:00
|
|
|
Target &llvm::getTheAArch64beTarget() {
|
2016-10-10 07:00:34 +08:00
|
|
|
static Target TheAArch64beTarget;
|
|
|
|
return TheAArch64beTarget;
|
|
|
|
}
|
2019-05-15 05:33:53 +08:00
|
|
|
Target &llvm::getTheAArch64_32Target() {
|
2019-05-14 19:25:44 +08:00
|
|
|
static Target TheAArch64leTarget;
|
|
|
|
return TheAArch64leTarget;
|
|
|
|
}
|
2019-05-15 05:33:53 +08:00
|
|
|
Target &llvm::getTheARM64Target() {
|
2016-10-10 07:00:34 +08:00
|
|
|
static Target TheARM64Target;
|
|
|
|
return TheARM64Target;
|
|
|
|
}
|
2019-05-15 05:33:53 +08:00
|
|
|
Target &llvm::getTheARM64_32Target() {
|
2019-05-14 19:25:44 +08:00
|
|
|
static Target TheARM64_32Target;
|
|
|
|
return TheARM64_32Target;
|
|
|
|
}
|
2014-03-29 18:18:08 +08:00
|
|
|
|
2019-06-11 11:21:13 +08:00
|
|
|
extern "C" void LLVMInitializeAArch64TargetInfo() {
|
2014-07-23 20:32:47 +08:00
|
|
|
// Now register the "arm64" name for use with "-march". We don't want it to
|
2019-05-14 19:25:44 +08:00
|
|
|
// take possession of the Triple::aarch64 tags though.
|
2016-10-10 07:00:34 +08:00
|
|
|
TargetRegistry::RegisterTarget(getTheARM64Target(), "arm64",
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
"ARM64 (little endian)", "AArch64",
|
2014-08-08 16:27:44 +08:00
|
|
|
[](Triple::ArchType) { return false; }, true);
|
2019-05-14 19:25:44 +08:00
|
|
|
TargetRegistry::RegisterTarget(getTheARM64_32Target(), "arm64_32",
|
|
|
|
"ARM64 (little endian ILP32)", "AArch64",
|
|
|
|
[](Triple::ArchType) { return false; }, true);
|
2014-05-24 20:42:26 +08:00
|
|
|
|
|
|
|
RegisterTarget<Triple::aarch64, /*HasJIT=*/true> Z(
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
getTheAArch64leTarget(), "aarch64", "AArch64 (little endian)", "AArch64");
|
2014-05-24 20:42:26 +08:00
|
|
|
RegisterTarget<Triple::aarch64_be, /*HasJIT=*/true> W(
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
getTheAArch64beTarget(), "aarch64_be", "AArch64 (big endian)", "AArch64");
|
2019-05-14 19:25:44 +08:00
|
|
|
RegisterTarget<Triple::aarch64_32, /*HasJIT=*/true> X(
|
|
|
|
getTheAArch64_32Target(), "aarch64_32", "AArch64 (little endian ILP32)", "AArch64");
|
2014-03-29 18:18:08 +08:00
|
|
|
}
|