From 730bf7330f33b7438f4536562ae8da920eb64938 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 20 Nov 2024 12:25:47 -0700 Subject: [PATCH] Fix the tests on riscv64gc-unknown-freebsd The fpregs was defined with two fields having the wrong sign, and one field having the wrong name. --- src/unix/bsd/freebsdlike/freebsd/riscv64.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs index 143393e5c56ae..85afef02975bf 100644 --- a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs @@ -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 { @@ -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 {} @@ -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() } } @@ -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 {