Skip to content

Commit

Permalink
Fix the tests on riscv64gc-unknown-freebsd
Browse files Browse the repository at this point in the history
The fpregs was defined with two fields having the wrong sign, and one
field having the wrong name.

(backport <rust-lang#4129>)
(cherry picked from commit 730bf73)
  • Loading branch information
asomers authored and tgross35 committed Nov 21, 2024
1 parent b3f0be0 commit 2435829
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/unix/bsd/freebsdlike/freebsd/riscv64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ s_no_extra_traits! {
}

pub struct fpregs {
pub fp_x: [[::register_t; 2]; 32],
pub fp_fcsr: ::register_t,
pub fp_x: [[u64; 2]; 32],
pub fp_fcsr: u64,
pub fp_flags: ::c_int,
pub fp_pad: ::c_int,
pub pad: ::c_int,
}

pub struct mcontext_t {
Expand Down Expand Up @@ -85,7 +85,7 @@ cfg_if! {
self.fp_x == other.fp_x
&& self.fp_fcsr == other.fp_fcsr
&& self.fp_flags == other.fp_flags
&& self.fp_pad == other.fp_pad
&& self.pad == other.pad
}
}
impl Eq for fpregs {}
Expand All @@ -95,7 +95,7 @@ cfg_if! {
.field("fp_x", &self.fp_x)
.field("fp_fcsr", &self.fp_fcsr)
.field("fp_flags", &self.fp_flags)
.field("fp_pad", &self.fp_pad)
.field("pad", &self.pad)
.finish()
}
}
Expand All @@ -104,7 +104,7 @@ cfg_if! {
self.fp_x.hash(state);
self.fp_fcsr.hash(state);
self.fp_flags.hash(state);
self.fp_pad.hash(state);
self.pad.hash(state);
}
}
impl PartialEq for mcontext_t {
Expand Down

0 comments on commit 2435829

Please sign in to comment.