* dsp.igen (do_ph_shift, do_w_shra): Fix bugs for rounding instructions.
This commit is contained in:
parent
b079691183
commit
69088b1706
|
@ -1,3 +1,7 @@
|
||||||
|
2006-05-15 Chao-ying Fu <fu@mips.com>
|
||||||
|
|
||||||
|
* dsp.igen (do_ph_shift, do_w_shra): Fix bugs for rounding instructions.
|
||||||
|
|
||||||
2006-04-18 Nick Clifton <nickc@redhat.com>
|
2006-04-18 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* dv-tx3904tmr.c (deliver_tx3904tmr_tick): Add missing break
|
* dv-tx3904tmr.c (deliver_tx3904tmr_tick): Add missing break
|
||||||
|
|
|
@ -193,8 +193,9 @@
|
||||||
}
|
}
|
||||||
else // right
|
else // right
|
||||||
{
|
{
|
||||||
if (sat == 1 && shift != 0)
|
if (sat == 1 && shift != 0 && (h0 & (1 << (shift-1))))
|
||||||
h0 += (1 << (shift - 1));
|
h0 = (h0 >> shift) + 1;
|
||||||
|
else
|
||||||
h0 = h0 >> shift;
|
h0 = h0 >> shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,8 +247,9 @@
|
||||||
{
|
{
|
||||||
unsigned32 result = GPR[rt];
|
unsigned32 result = GPR[rt];
|
||||||
signed32 h0 = (signed32)result;
|
signed32 h0 = (signed32)result;
|
||||||
if (shift != 0)
|
if (shift != 0 && (h0 & (1 << (shift-1))))
|
||||||
h0 += (1 << (shift - 1));
|
h0 = (h0 >> shift) + 1;
|
||||||
|
else
|
||||||
h0 = h0 >> shift;
|
h0 = h0 >> shift;
|
||||||
GPR[rd] = EXTEND32 (h0);
|
GPR[rd] = EXTEND32 (h0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue