mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-09 00:58:11 +08:00
PR sim/12737
* iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a signed compare. (WMAC): Extend computed result before adding to result register. (WRSA): Sign extend 32-bit values before shifting.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2011-07-01 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR sim/12737
|
||||||
|
* iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a
|
||||||
|
signed compare.
|
||||||
|
(WMAC): Extend computed result before adding to result register.
|
||||||
|
(WRSA): Sign extend 32-bit values before shifting.
|
||||||
|
|
||||||
2011-04-16 Mike Frysinger <vapier@gentoo.org>
|
2011-04-16 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* wrapper.c (sim_complete_command): New stub function.
|
* wrapper.c (sim_complete_command): New stub function.
|
||||||
|
@ -1744,11 +1744,12 @@ WCMPGT (ARMul_State * state, ARMword instr)
|
|||||||
{
|
{
|
||||||
signed long a, b;
|
signed long a, b;
|
||||||
|
|
||||||
a = wRWORD (BITS (16, 19), i);
|
a = EXTEND32 (wRWORD (BITS (16, 19), i));
|
||||||
b = wRWORD (BITS (0, 3), i);
|
b = EXTEND32 (wRWORD (BITS (0, 3), i));
|
||||||
|
|
||||||
s = (a > b) ? 0xffffffff : 0;
|
s = (a > b) ? 0xffffffff : 0;
|
||||||
r |= s << (i * 32);
|
r |= s << (i * 32);
|
||||||
|
|
||||||
SIMD32_SET (psr, NBIT32 (s), SIMD_NBIT, i);
|
SIMD32_SET (psr, NBIT32 (s), SIMD_NBIT, i);
|
||||||
SIMD32_SET (psr, ZBIT32 (s), SIMD_ZBIT, i);
|
SIMD32_SET (psr, ZBIT32 (s), SIMD_ZBIT, i);
|
||||||
}
|
}
|
||||||
@ -2128,13 +2129,15 @@ WMAC (ARMword instr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BIT (20))
|
if (BIT (21))
|
||||||
wR [BITS (12, 15)] = 0;
|
t = EXTEND32 (t);
|
||||||
|
|
||||||
if (BIT (21)) /* Signed. */
|
|
||||||
wR[BITS (12, 15)] += t;
|
|
||||||
else
|
else
|
||||||
wR [BITS (12, 15)] += t;
|
t &= 0xffffffff;
|
||||||
|
|
||||||
|
if (BIT (20))
|
||||||
|
wR [BITS (12, 15)] = t;
|
||||||
|
else
|
||||||
|
wR[BITS (12, 15)] += t;
|
||||||
|
|
||||||
wC [wCon] |= WCON_MUP;
|
wC [wCon] |= WCON_MUP;
|
||||||
|
|
||||||
@ -2904,7 +2907,7 @@ WSRA (ARMul_State * state, ARMword instr)
|
|||||||
t = (wRWORD (BITS (16, 19), i) & 0x80000000) ? 0xffffffff : 0;
|
t = (wRWORD (BITS (16, 19), i) & 0x80000000) ? 0xffffffff : 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = wRWORD (BITS (16, 19), i);
|
t = EXTEND32 (wRWORD (BITS (16, 19), i));
|
||||||
t >>= shift;
|
t >>= shift;
|
||||||
}
|
}
|
||||||
s = t;
|
s = t;
|
||||||
|
Reference in New Issue
Block a user