summaryrefslogtreecommitdiff
path: root/sim/common/sim-fpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common/sim-fpu.c')
-rw-r--r--sim/common/sim-fpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index abf746a9b68..99381e06b17 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -541,7 +541,7 @@ i2fpu (sim_fpu *f, signed64 i, int is_64bit)
{
do
{
- f->fraction >>= 1;
+ f->fraction = (f->fraction >> 1) | (f->fraction & 1);
f->normal_exp += 1;
}
while (f->fraction >= IMPLICIT_2);