This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
sh/gencode.c: fix dynamic shift by -32
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 18 Aug 2004 12:50:42 +0100 (BST)
- Subject: sh/gencode.c: fix dynamic shift by -32
Applied as obvious.
2004-08-18 J"orn Rennecke <joern.rennecke@superh.com>
* gencode.c (tab): For shad snd shld, fix result for
(op1 < 0 && shift_amount == 0).
Index: gencode.c
===================================================================
RCS file: /cvs/src/src/sim/sh/gencode.c,v
retrieving revision 1.28
diff -p -r1.28 gencode.c
*** gencode.c 13 Feb 2004 00:01:19 -0000 1.28
--- gencode.c 18 Aug 2004 11:37:44 -0000
*************** op tab[] =
*** 1054,1060 ****
},
{ "n", "mn", "shad <REG_M>,<REG_N>", "0100nnnnmmmm1100",
! "R[n] = (R[m] < 0) ? (R[n] >> ((-R[m])&0x1f)) : (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shal <REG_N>", "0100nnnn00100000",
--- 1054,1060 ----
},
{ "n", "mn", "shad <REG_M>,<REG_N>", "0100nnnnmmmm1100",
! "R[n] = (R[m] < 0) ? (R[m]&0x1f ? R[n] >> ((-R[m])&0x1f) : R[n] >> 31) : (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shal <REG_N>", "0100nnnn00100000",
*************** op tab[] =
*** 1068,1074 ****
},
{ "n", "mn", "shld <REG_M>,<REG_N>", "0100nnnnmmmm1101",
! "R[n] = (R[m] < 0) ? (UR[n] >> ((-R[m])&0x1f)): (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shll <REG_N>", "0100nnnn00000000",
--- 1068,1074 ----
},
{ "n", "mn", "shld <REG_M>,<REG_N>", "0100nnnnmmmm1101",
! "R[n] = (R[m] < 0) ? (R[m]&0x1f ? UR[n] >> ((-R[m])&0x1f) : 0): (R[n] << (R[m] & 0x1f));",
},
{ "n", "n", "shll <REG_N>", "0100nnnn00000000",