Skip to content

Commit

Permalink
Replace type 'float32_t' with 'riscv_float_t'
Browse files Browse the repository at this point in the history
Replace the usage of the softfloat type 'float32_t' with the custom
'riscv_float_t' type defined within rv32emu. This modification ensures
better integration and consistency within the rv32emu codebase.
  • Loading branch information
visitorckw committed Nov 16, 2023
1 parent c9dda3f commit f237cec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rv32_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ RVOP(fmadds, {
/* FMSUB.S */
RVOP(fmsubs, {
set_rounding_mode(rv);
float32_t tmp = rv->F[ir->rs3];
riscv_float_t tmp = rv->F[ir->rs3];
tmp.v ^= FMASK_SIGN;
rv->F[ir->rd] = f32_mulAdd(rv->F[ir->rs1], rv->F[ir->rs2], tmp);
set_fflag(rv);
Expand All @@ -636,7 +636,7 @@ RVOP(fmsubs, {
/* FNMSUB.S */
RVOP(fnmsubs, {
set_rounding_mode(rv);
float32_t tmp = rv->F[ir->rs1];
riscv_float_t tmp = rv->F[ir->rs1];
tmp.v ^= FMASK_SIGN;
rv->F[ir->rd] = f32_mulAdd(tmp, rv->F[ir->rs2], rv->F[ir->rs3]);
set_fflag(rv);
Expand All @@ -645,8 +645,8 @@ RVOP(fnmsubs, {
/* FNMADD.S */
RVOP(fnmadds, {
set_rounding_mode(rv);
float32_t tmp1 = rv->F[ir->rs1];
float32_t tmp2 = rv->F[ir->rs3];
riscv_float_t tmp1 = rv->F[ir->rs1];
riscv_float_t tmp2 = rv->F[ir->rs3];
tmp1.v ^= FMASK_SIGN;
tmp2.v ^= FMASK_SIGN;
rv->F[ir->rd] = f32_mulAdd(tmp1, rv->F[ir->rs2], tmp2);
Expand Down

0 comments on commit f237cec

Please sign in to comment.