mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Update powerpc data layouts
Function pointer alignment is specified since https://reviews.llvm.org/D147016.
This commit is contained in:
parent
055dd282c5
commit
ad7ea8b7e6
@ -145,6 +145,17 @@ pub unsafe fn create_module<'ll>(
|
||||
target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
|
||||
}
|
||||
}
|
||||
if llvm_version < (17, 0, 0) {
|
||||
if sess.target.arch.starts_with("powerpc") {
|
||||
// LLVM 17 specifies function pointer alignment for ppc:
|
||||
// https://reviews.llvm.org/D147016
|
||||
target_data_layout = target_data_layout
|
||||
.replace("-Fn32", "")
|
||||
.replace("-Fi32", "")
|
||||
.replace("-Fn64", "")
|
||||
.replace("-Fi64", "");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the data-layout values hardcoded remain the defaults.
|
||||
if sess.target.is_builtin {
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-ibm-aix".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:a-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "E-m:a-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: base,
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-freebsd".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:e-i64:64-n32:64".into(),
|
||||
data_layout: "E-m:e-Fn32-i64:64-n32:64".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-linux-gnu".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-linux-musl".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-openbsd".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:e-i64:64-n32:64".into(),
|
||||
data_layout: "E-m:e-Fn32-i64:64-n32:64".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64-unknown-linux-gnu".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "E-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { endian: Endian::Big, ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64le-unknown-freebsd".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-i64:64-n32:64".into(),
|
||||
data_layout: "e-m:e-Fn32-i64:64-n32:64".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64le-unknown-linux-gnu".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc64le-unknown-linux-musl".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
|
||||
arch: "powerpc64".into(),
|
||||
options: TargetOptions { mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-freebsd13.0".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions {
|
||||
endian: Endian::Big,
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-linux-gnu".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-linux-gnuspe".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions {
|
||||
abi: "spe".into(),
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-linux-musl".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-netbsd".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions { endian: Endian::Big, mcount: "__mcount".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-openbsd".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: base,
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-linux-gnu".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions { endian: Endian::Big, features: "+secure-plt".into(), ..base },
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "powerpc-unknown-linux-gnuspe".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "E-m:e-p:32:32-i64:64-n32".into(),
|
||||
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
|
||||
arch: "powerpc".into(),
|
||||
options: TargetOptions {
|
||||
abi: "spe".into(),
|
||||
|
Loading…
Reference in New Issue
Block a user