LLVM 16: Update RISCV data layout
This commit is contained in:
parent
1e1e5b8d98
commit
f414715ebf
@ -158,6 +158,10 @@ pub unsafe fn create_module<'ll>(
|
|||||||
if sess.target.arch == "s390x" {
|
if sess.target.arch == "s390x" {
|
||||||
target_data_layout = target_data_layout.replace("-v128:64", "");
|
target_data_layout = target_data_layout.replace("-v128:64", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sess.target.arch == "riscv64" {
|
||||||
|
target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the data-layout values hardcoded remain the defaults.
|
// Ensure the data-layout values hardcoded remain the defaults.
|
||||||
|
@ -4,7 +4,7 @@ pub fn target() -> Target {
|
|||||||
Target {
|
Target {
|
||||||
llvm_target: "riscv64-unknown-freebsd".into(),
|
llvm_target: "riscv64-unknown-freebsd".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
code_model: Some(CodeModel::Medium),
|
code_model: Some(CodeModel::Medium),
|
||||||
|
@ -4,7 +4,7 @@ pub fn target() -> Target {
|
|||||||
Target {
|
Target {
|
||||||
llvm_target: "riscv64-unknown-linux-gnu".into(),
|
llvm_target: "riscv64-unknown-linux-gnu".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
code_model: Some(CodeModel::Medium),
|
code_model: Some(CodeModel::Medium),
|
||||||
|
@ -4,7 +4,7 @@ pub fn target() -> Target {
|
|||||||
Target {
|
Target {
|
||||||
llvm_target: "riscv64-unknown-linux-musl".into(),
|
llvm_target: "riscv64-unknown-linux-musl".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
code_model: Some(CodeModel::Medium),
|
code_model: Some(CodeModel::Medium),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
llvm_target: "riscv64".into(),
|
llvm_target: "riscv64".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
|
@ -4,7 +4,7 @@ pub fn target() -> Target {
|
|||||||
Target {
|
Target {
|
||||||
llvm_target: "riscv64-unknown-openbsd".into(),
|
llvm_target: "riscv64-unknown-openbsd".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
code_model: Some(CodeModel::Medium),
|
code_model: Some(CodeModel::Medium),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
Target {
|
Target {
|
||||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
|
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||||
llvm_target: "riscv64".into(),
|
llvm_target: "riscv64".into(),
|
||||||
pointer_width: 64,
|
pointer_width: 64,
|
||||||
arch: "riscv64".into(),
|
arch: "riscv64".into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user