Skip to content

Commit

Permalink
Auto merge of #2000 - lu-zero:aarch64-musl-mcontext_t, r=JohnTitor
Browse files Browse the repository at this point in the history
Populate mcontext_t on aarch64-linux-musl

It is used by wasmtime.

Should address bytecodealliance/wasmtime#2133
  • Loading branch information
bors committed Dec 21, 2020
2 parents f26757a + 0b86101 commit d1c832d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/unix/linux_like/linux/musl/b64/aarch64/align.rs
Expand Up @@ -6,7 +6,7 @@ s_no_extra_traits! {
}
}

s!{
s! {
pub struct ucontext_t {
pub uc_flags: ::c_ulong,
pub uc_link: *mut ucontext_t,
Expand All @@ -17,9 +17,11 @@ s!{

#[repr(align(16))]
pub struct mcontext_t {
// What we want here is a single [u64; 36 + 512], but splitting things
// up allows Debug to be auto-derived.
__regs1: [[u64; 18]; 2], // 36
__regs2: [[u64; 32]; 16], // 512
pub fault_address: ::c_ulong,
pub regs: [::c_ulong; 31],
pub sp: ::c_ulong,
pub pc: ::c_ulong,
pub pstate: ::c_ulong,
__reserved: [[u64; 32]; 16],
}
}

0 comments on commit d1c832d

Please sign in to comment.