mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[PowerPC][Triple] Use elfv2 on freebsd>=13 and linux-musl
Summary: Every powerpc64le platform uses elfv2. For powerpc64, the environments "elfv1" and "elfv2" were added for FreeBSD ELFv1->ELFv2 migration in D61950. FreeBSD developers have decided to use OS versions to select ABI, and no one is relying on the environments. Also use elfv2 on powerpc64-linux-musl. Users can always use -mabi=elfv1 and -mabi=elfv2 to override the default ABI. Reviewed By: adalava Differential Revision: https://reviews.llvm.org/D72352
This commit is contained in:
parent
7d3262ad06
commit
3cceefd641
@ -203,8 +203,6 @@ public:
|
|||||||
CODE16,
|
CODE16,
|
||||||
EABI,
|
EABI,
|
||||||
EABIHF,
|
EABIHF,
|
||||||
ELFv1,
|
|
||||||
ELFv2,
|
|
||||||
Android,
|
Android,
|
||||||
Musl,
|
Musl,
|
||||||
MuslEABI,
|
MuslEABI,
|
||||||
|
@ -228,8 +228,6 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
|
|||||||
case CODE16: return "code16";
|
case CODE16: return "code16";
|
||||||
case EABI: return "eabi";
|
case EABI: return "eabi";
|
||||||
case EABIHF: return "eabihf";
|
case EABIHF: return "eabihf";
|
||||||
case ELFv1: return "elfv1";
|
|
||||||
case ELFv2: return "elfv2";
|
|
||||||
case Android: return "android";
|
case Android: return "android";
|
||||||
case Musl: return "musl";
|
case Musl: return "musl";
|
||||||
case MuslEABI: return "musleabi";
|
case MuslEABI: return "musleabi";
|
||||||
@ -524,8 +522,6 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
|
|||||||
return StringSwitch<Triple::EnvironmentType>(EnvironmentName)
|
return StringSwitch<Triple::EnvironmentType>(EnvironmentName)
|
||||||
.StartsWith("eabihf", Triple::EABIHF)
|
.StartsWith("eabihf", Triple::EABIHF)
|
||||||
.StartsWith("eabi", Triple::EABI)
|
.StartsWith("eabi", Triple::EABI)
|
||||||
.StartsWith("elfv1", Triple::ELFv1)
|
|
||||||
.StartsWith("elfv2", Triple::ELFv2)
|
|
||||||
.StartsWith("gnuabin32", Triple::GNUABIN32)
|
.StartsWith("gnuabin32", Triple::GNUABIN32)
|
||||||
.StartsWith("gnuabi64", Triple::GNUABI64)
|
.StartsWith("gnuabi64", Triple::GNUABI64)
|
||||||
.StartsWith("gnueabihf", Triple::GNUEABIHF)
|
.StartsWith("gnueabihf", Triple::GNUEABIHF)
|
||||||
|
@ -215,8 +215,6 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
|||||||
case Triple::ppc64le:
|
case Triple::ppc64le:
|
||||||
return PPCTargetMachine::PPC_ABI_ELFv2;
|
return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||||
case Triple::ppc64:
|
case Triple::ppc64:
|
||||||
if (TT.getEnvironment() == llvm::Triple::ELFv2)
|
|
||||||
return PPCTargetMachine::PPC_ABI_ELFv2;
|
|
||||||
return PPCTargetMachine::PPC_ABI_ELFv1;
|
return PPCTargetMachine::PPC_ABI_ELFv1;
|
||||||
default:
|
default:
|
||||||
return PPCTargetMachine::PPC_ABI_UNKNOWN;
|
return PPCTargetMachine::PPC_ABI_UNKNOWN;
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
||||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
||||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
||||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd-elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
|
||||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-freebsd-elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
|
||||||
|
|
||||||
; CHECK-ELFv2: .abiversion 2
|
; CHECK-ELFv2: .abiversion 2
|
||||||
; CHECK-ELFv1-NOT: .abiversion 2
|
; CHECK-ELFv1-NOT: .abiversion 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user