diff options
author | Andrew Waterman <aswaterman@gmail.com> | 2017-11-01 01:13:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 01:13:45 -0700 |
commit | 220b1bee10d9399864131cd1dbe5037714237f03 (patch) | |
tree | fbff0df5c1c523befdf3f150f7672fc9111a3983 /machine | |
parent | 18087efa98d77918d55127c3d7745cd6d6d9d77b (diff) | |
download | pk-220b1bee10d9399864131cd1dbe5037714237f03.zip pk-220b1bee10d9399864131cd1dbe5037714237f03.tar.gz pk-220b1bee10d9399864131cd1dbe5037714237f03.tar.bz2 |
Fix(?) fcvt.s.w emulation for rs1 = -2^31 (#66)
Diffstat (limited to 'machine')
-rw-r--r-- | machine/fp_emulation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/machine/fp_emulation.c b/machine/fp_emulation.c index ffa431b..c83ef73 100644 --- a/machine/fp_emulation.c +++ b/machine/fp_emulation.c @@ -201,7 +201,7 @@ DECLARE_EMULATION_FUNC(emulate_fcvt_fi) { case 0: // int32 negative = (int32_t)uint_val < 0; - uint_val = negative ? -(int32_t)uint_val : (int32_t)uint_val; + uint_val = (uint32_t)(negative ? -uint_val : uint_val); break; case 1: // uint32 uint_val = (uint32_t)uint_val; |