diff options
author | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2023-05-09 17:32:05 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@vrull.eu> | 2023-05-09 17:37:06 +0200 |
commit | e25fb13bcd2fb2b108c3fe1d94831229adeb7e37 (patch) | |
tree | d7405e3121721c4d2371b0708689c7ff0c6a7f8e /riscv/insns | |
parent | eb75ab37a17ff4f8597b7b40283a08c38d2a6ff6 (diff) | |
download | riscv-isa-sim-e25fb13bcd2fb2b108c3fe1d94831229adeb7e37.zip riscv-isa-sim-e25fb13bcd2fb2b108c3fe1d94831229adeb7e37.tar.gz riscv-isa-sim-e25fb13bcd2fb2b108c3fe1d94831229adeb7e37.tar.bz2 |
Zfa: fix NX handling for the fround/froundnx family
The initial implementation (together with the SAIL code and the tests)
had gotten the NX variants backwards (as in 'an inexact result is ok'
vs. 'set NX is inexact'). Update all 4 instructions.
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Diffstat (limited to 'riscv/insns')
-rw-r--r-- | riscv/insns/fround_d.h | 2 | ||||
-rw-r--r-- | riscv/insns/fround_h.h | 2 | ||||
-rw-r--r-- | riscv/insns/fround_q.h | 2 | ||||
-rw-r--r-- | riscv/insns/fround_s.h | 2 | ||||
-rw-r--r-- | riscv/insns/froundnx_d.h | 2 | ||||
-rw-r--r-- | riscv/insns/froundnx_h.h | 2 | ||||
-rw-r--r-- | riscv/insns/froundnx_q.h | 2 | ||||
-rw-r--r-- | riscv/insns/froundnx_s.h | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/riscv/insns/fround_d.h b/riscv/insns/fround_d.h index 1127135..0e8a1ba 100644 --- a/riscv/insns/fround_d.h +++ b/riscv/insns/fround_d.h @@ -1,5 +1,5 @@ require_extension('D'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_D(f64_roundToInt(FRS1_D, RM, true)); +WRITE_FRD_D(f64_roundToInt(FRS1_D, RM, false)); set_fp_exceptions; diff --git a/riscv/insns/fround_h.h b/riscv/insns/fround_h.h index 6417a39..0c6cdae 100644 --- a/riscv/insns/fround_h.h +++ b/riscv/insns/fround_h.h @@ -1,5 +1,5 @@ require_extension(EXT_ZFH); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_H(f16_roundToInt(FRS1_H, RM, true)); +WRITE_FRD_H(f16_roundToInt(FRS1_H, RM, false)); set_fp_exceptions; diff --git a/riscv/insns/fround_q.h b/riscv/insns/fround_q.h index 51ebce2..91bab77 100644 --- a/riscv/insns/fround_q.h +++ b/riscv/insns/fround_q.h @@ -1,5 +1,5 @@ require_extension('Q'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD(f128_roundToInt(f128(FRS1), RM, true)); +WRITE_FRD(f128_roundToInt(f128(FRS1), RM, false)); set_fp_exceptions; diff --git a/riscv/insns/fround_s.h b/riscv/insns/fround_s.h index 272897e..f6e75f5 100644 --- a/riscv/insns/fround_s.h +++ b/riscv/insns/fround_s.h @@ -1,5 +1,5 @@ require_extension('F'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_F(f32_roundToInt(FRS1_F, RM, true)); +WRITE_FRD_F(f32_roundToInt(FRS1_F, RM, false)); set_fp_exceptions; diff --git a/riscv/insns/froundnx_d.h b/riscv/insns/froundnx_d.h index 0e8a1ba..1127135 100644 --- a/riscv/insns/froundnx_d.h +++ b/riscv/insns/froundnx_d.h @@ -1,5 +1,5 @@ require_extension('D'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_D(f64_roundToInt(FRS1_D, RM, false)); +WRITE_FRD_D(f64_roundToInt(FRS1_D, RM, true)); set_fp_exceptions; diff --git a/riscv/insns/froundnx_h.h b/riscv/insns/froundnx_h.h index 0c6cdae..6417a39 100644 --- a/riscv/insns/froundnx_h.h +++ b/riscv/insns/froundnx_h.h @@ -1,5 +1,5 @@ require_extension(EXT_ZFH); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_H(f16_roundToInt(FRS1_H, RM, false)); +WRITE_FRD_H(f16_roundToInt(FRS1_H, RM, true)); set_fp_exceptions; diff --git a/riscv/insns/froundnx_q.h b/riscv/insns/froundnx_q.h index 91bab77..51ebce2 100644 --- a/riscv/insns/froundnx_q.h +++ b/riscv/insns/froundnx_q.h @@ -1,5 +1,5 @@ require_extension('Q'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD(f128_roundToInt(f128(FRS1), RM, false)); +WRITE_FRD(f128_roundToInt(f128(FRS1), RM, true)); set_fp_exceptions; diff --git a/riscv/insns/froundnx_s.h b/riscv/insns/froundnx_s.h index f6e75f5..272897e 100644 --- a/riscv/insns/froundnx_s.h +++ b/riscv/insns/froundnx_s.h @@ -1,5 +1,5 @@ require_extension('F'); require_extension(EXT_ZFA); require_fp; -WRITE_FRD_F(f32_roundToInt(FRS1_F, RM, false)); +WRITE_FRD_F(f32_roundToInt(FRS1_F, RM, true)); set_fp_exceptions; |