diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2026-05-01 16:16:33 +1000 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2026-05-21 19:18:56 -0700 |
| commit | 6ce98c8199f52ea52ee0995da504c0cbff6b8f8c (patch) | |
| tree | 3b110f3da0c3684df88a757fc3355914f4915a22 /fpu | |
| parent | c26e4876d108f517fb579c2af93960c8035e8d1a (diff) | |
| download | qemu-6ce98c8199f52ea52ee0995da504c0cbff6b8f8c.tar.gz qemu-6ce98c8199f52ea52ee0995da504c0cbff6b8f8c.zip | |
fpu: Use of {get,set}_floatx80_rounding_precision everywhere
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'fpu')
| -rw-r--r-- | fpu/softfloat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fpu/softfloat.c b/fpu/softfloat.c index d99543cc60..d2a9f97089 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1515,7 +1515,7 @@ float128 float128_round_pack_canonical(FloatParts128 *p, float_status *s) bool floatx80_unpack_canonical(FloatParts128 *p, floatx80 f, float_status *s) { /* Ensure rounding precision is set before beginning. */ - switch (s->floatx80_rounding_precision) { + switch (get_floatx80_rounding_precision(s)) { case floatx80_precision_x: case floatx80_precision_d: case floatx80_precision_s: @@ -1550,14 +1550,14 @@ bool floatx80_unpack_canonical(FloatParts128 *p, floatx80 f, float_status *s) floatx80 floatx80_round_pack_canonical(FloatParts128 *p, float_status *s) { - const FloatFmt *fmt = &floatx80_params[s->floatx80_rounding_precision]; + const FloatFmt *fmt = &floatx80_params[get_floatx80_rounding_precision(s)]; uint64_t frac; int exp; switch (p->cls) { case float_class_normal: case float_class_denormal: - if (s->floatx80_rounding_precision == floatx80_precision_x) { + if (get_floatx80_rounding_precision(s) == floatx80_precision_x) { parts128_uncanon_normal(p, s, fmt, false); frac = p->frac_hi; exp = p->exp; @@ -2853,7 +2853,7 @@ floatx80 floatx80_round_to_int(floatx80 a, float_status *status) } p = parts128_round_to_int(&p, get_float_rounding_mode(status), 0, status, - &floatx80_params[status->floatx80_rounding_precision]); + &floatx80_params[get_floatx80_rounding_precision(status)]); return floatx80_round_pack_canonical(&p, status); } @@ -4503,7 +4503,7 @@ floatx80 floatx80_sqrt(floatx80 a, float_status *s) if (!floatx80_unpack_canonical(&p, a, s)) { return floatx80_default_nan(s); } - parts128_sqrt(&p, s, &floatx80_params[s->floatx80_rounding_precision]); + parts128_sqrt(&p, s, &floatx80_params[get_floatx80_rounding_precision(s)]); return floatx80_round_pack_canonical(&p, s); } |
