Skip to content

Commit b2afecf

Browse files
authored
Unrolled build for rust-lang#132354
Rollup merge of rust-lang#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).
2 parents 9ccfedf + c1db011 commit b2afecf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/rustc_codegen_ssa/src/back/metadata.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
325325
"" | "ilp32" | "lp64" => (),
326326
"ilp32f" | "lp64f" => e_flags |= elf::EF_RISCV_FLOAT_ABI_SINGLE,
327327
"ilp32d" | "lp64d" => e_flags |= elf::EF_RISCV_FLOAT_ABI_DOUBLE,
328-
"ilp32e" => e_flags |= elf::EF_RISCV_RVE,
328+
// Note that the `lp64e` is still unstable as it's not (yet) part of the ELF psABI.
329+
"ilp32e" | "lp64e" => e_flags |= elf::EF_RISCV_RVE,
329330
_ => bug!("unknown RISC-V ABI name"),
330331
}
331332

compiler/rustc_target/src/spec/tests/tests_impl.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ impl Target {
165165
assert_matches!(&*self.llvm_abiname, "ilp32" | "ilp32f" | "ilp32d" | "ilp32e")
166166
}
167167
"riscv64" => {
168-
assert_matches!(&*self.llvm_abiname, "lp64" | "lp64f" | "lp64d" | "lp64q")
168+
// Note that the `lp64e` is still unstable as it's not (yet) part of the ELF psABI.
169+
assert_matches!(&*self.llvm_abiname, "lp64" | "lp64f" | "lp64d" | "lp64q" | "lp64e")
169170
}
170171
_ => {}
171172
}

0 commit comments

Comments
 (0)