Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 092643a

Browse files
committed
Explicitly mark x86-interrupt ABI argument as byval
The first argument to an x86-interrupt ABI function was implicitly treated as byval prior to LLVM 12. Since LLVM 12, it has to be marked as such explicitly: llvm/llvm-project@2e0e03c
1 parent 55f345f commit 092643a

File tree

1 file changed

+7
-0
lines changed
  • compiler/rustc_target/src/abi/call

1 file changed

+7
-0
lines changed

compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,13 @@ impl<'a, Ty> FnAbi<'a, Ty> {
603603
Ty: TyAndLayoutMethods<'a, C> + Copy,
604604
C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
605605
{
606+
if abi == spec::abi::Abi::X86Interrupt {
607+
if let Some(arg) = self.args.first_mut() {
608+
arg.make_indirect_byval();
609+
}
610+
return Ok(());
611+
}
612+
606613
match &cx.target_spec().arch[..] {
607614
"x86" => {
608615
let flavor = if abi == spec::abi::Abi::Fastcall {

0 commit comments

Comments
 (0)