summary refs log tree commit diff stats
path: root/hw/m68k/virt.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-09-03 17:22:15 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-09-05 13:12:36 +0100
commit09b0d9e0ad24e875c006e024e184be8b79d2ad11 (patch)
treec2fbbc0120dc6a04a8b777d8f401c877c5e89b7b /hw/m68k/virt.c
parent2da2d7dc904c4afa84ae1a869a63438a8bf17e67 (diff)
downloadfocaccia-qemu-09b0d9e0ad24e875c006e024e184be8b79d2ad11.tar.gz
focaccia-qemu-09b0d9e0ad24e875c006e024e184be8b79d2ad11.zip
target/arm: Prepare bfdotadd() callers for FEAT_EBF support
We use bfdotadd() in four callsites for various helper functions. Currently
this all assumes that we have the FPCR.EBF=0 semantics. For FPCR.EBF=1
we will need to:
 * call a different routine to bfdotadd() because we need to do a
   fused multiply-add rather than separate multiply and add steps
 * use a different float_status that honours the FPCR rounding mode
   and denormal-flushing fields
 * pass in an extra float_status that has been set up to perform
   round-to-odd rounding

To prepare for this, refactor all the callsites so that instead of
   for (...) {
       x = bfdotadd(...);
   }

they are:
   float_status fpst, fpst_odd;
   if (is_ebf(env, &fpst, &fpst_odd)) {
       for (...) {
           x = bfdotadd_ebf(..., &fpst, &fpst_odd);
       }
   } else {
       for (...) {
           x = bfdotadd(..., &fpst);
       }
   }

For the moment the is_ebf() function always returns false, sets up
fpst for EBF=0 semantics and never sets up fpst_odd; bfdotadd_ebf()
will assert if called. We'll fill in the handling for EBF=1 in the
next commit.

This change should be a zero-behaviour-change refactor.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/m68k/virt.c')
0 files changed, 0 insertions, 0 deletions