mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Rollup merge of #132354 - koute:master, r=workingjubilee
Add `lp64e` RISC-V ABI This PR adds support for the `lp64e` RISC-V ABI, which is the 64-bit equivalent of the `ilp32e` ABI that is already supported. For reference, this ABI was originally added to LLVM in [this PR](https://reviews.llvm.org/D70401).
This commit is contained in:
commit
6b96a7944a
@ -325,7 +325,8 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
|
|||||||
"" | "ilp32" | "lp64" => (),
|
"" | "ilp32" | "lp64" => (),
|
||||||
"ilp32f" | "lp64f" => e_flags |= elf::EF_RISCV_FLOAT_ABI_SINGLE,
|
"ilp32f" | "lp64f" => e_flags |= elf::EF_RISCV_FLOAT_ABI_SINGLE,
|
||||||
"ilp32d" | "lp64d" => e_flags |= elf::EF_RISCV_FLOAT_ABI_DOUBLE,
|
"ilp32d" | "lp64d" => e_flags |= elf::EF_RISCV_FLOAT_ABI_DOUBLE,
|
||||||
"ilp32e" => e_flags |= elf::EF_RISCV_RVE,
|
// Note that the `lp64e` is still unstable as it's not (yet) part of the ELF psABI.
|
||||||
|
"ilp32e" | "lp64e" => e_flags |= elf::EF_RISCV_RVE,
|
||||||
_ => bug!("unknown RISC-V ABI name"),
|
_ => bug!("unknown RISC-V ABI name"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,8 @@ impl Target {
|
|||||||
assert_matches!(&*self.llvm_abiname, "ilp32" | "ilp32f" | "ilp32d" | "ilp32e")
|
assert_matches!(&*self.llvm_abiname, "ilp32" | "ilp32f" | "ilp32d" | "ilp32e")
|
||||||
}
|
}
|
||||||
"riscv64" => {
|
"riscv64" => {
|
||||||
assert_matches!(&*self.llvm_abiname, "lp64" | "lp64f" | "lp64d" | "lp64q")
|
// Note that the `lp64e` is still unstable as it's not (yet) part of the ELF psABI.
|
||||||
|
assert_matches!(&*self.llvm_abiname, "lp64" | "lp64f" | "lp64d" | "lp64q" | "lp64e")
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user