compiler: Add riscv64gc-unknown-hermit target

Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
This commit is contained in:
Simon Schöning 2021-05-21 12:20:59 +02:00 committed by Martin Kröning
parent 636804e032
commit 3003fe2d80
Failed to extract signature
3 changed files with 22 additions and 0 deletions

View File

@ -1418,6 +1418,7 @@ fn $module() {
("msp430-none-elf", msp430_none_elf), ("msp430-none-elf", msp430_none_elf),
("aarch64-unknown-hermit", aarch64_unknown_hermit), ("aarch64-unknown-hermit", aarch64_unknown_hermit),
("riscv64gc-unknown-hermit", riscv64gc_unknown_hermit),
("x86_64-unknown-hermit", x86_64_unknown_hermit), ("x86_64-unknown-hermit", x86_64_unknown_hermit),
("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf), ("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf),

View File

@ -0,0 +1,20 @@
use crate::spec::{CodeModel, RelocModel, Target, TargetOptions, TlsModel};
pub fn target() -> Target {
Target {
llvm_target: "riscv64-unknown-hermit".into(),
pointer_width: 64,
arch: "riscv64".into(),
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
options: TargetOptions {
cpu: "generic-rv64".into(),
features: "+m,+a,+f,+d,+c".into(),
relocation_model: RelocModel::Pic,
code_model: Some(CodeModel::Medium),
tls_model: TlsModel::LocalExec,
max_atomic_width: Some(64),
llvm_abiname: "lp64d".into(),
..super::hermit_base::opts()
},
}
}

View File

@ -122,6 +122,7 @@
"riscv32imac-unknown-none-elf", "riscv32imac-unknown-none-elf",
"riscv32gc-unknown-linux-gnu", "riscv32gc-unknown-linux-gnu",
"riscv64imac-unknown-none-elf", "riscv64imac-unknown-none-elf",
"riscv64gc-unknown-hermit",
"riscv64gc-unknown-none-elf", "riscv64gc-unknown-none-elf",
"riscv64gc-unknown-linux-gnu", "riscv64gc-unknown-linux-gnu",
"s390x-unknown-linux-gnu", "s390x-unknown-linux-gnu",