From: Joern Rennecke Date: Wed, 18 Aug 2004 11:47:15 +0000 (+0000) Subject: * gencode.c (tab): For shad snd shld, fix result for X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a134f341e6c8cac4514564d526d3251adf5bafad;p=binutils-gdb.git * gencode.c (tab): For shad snd shld, fix result for (op1 < 0 && shift_amount == 0). --- diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 549e49976ba..10b4ae21710 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2004-08-18 J"orn Rennecke + + * gencode.c (tab): For shad snd shld, fix result for + (op1 < 0 && shift_amount == 0). + 2004-02-02 Michael Snyder * gencode.c (movua.l): Set thislock to 0, not n. diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c index 33475918704..155138a2daf 100644 --- a/sim/sh/gencode.c +++ b/sim/sh/gencode.c @@ -1054,7 +1054,7 @@ op tab[] = }, { "n", "mn", "shad ,", "0100nnnnmmmm1100", - "R[n] = (R[m] < 0) ? (R[n] >> ((-R[m])&0x1f)) : (R[n] << (R[m] & 0x1f));", + "R[n] = (R[m] < 0) ? (R[m]&0x1f ? R[n] >> ((-R[m])&0x1f) : R[n] >> 31) : (R[n] << (R[m] & 0x1f));", }, { "n", "n", "shal ", "0100nnnn00100000", @@ -1068,7 +1068,7 @@ op tab[] = }, { "n", "mn", "shld ,", "0100nnnnmmmm1101", - "R[n] = (R[m] < 0) ? (UR[n] >> ((-R[m])&0x1f)): (R[n] << (R[m] & 0x1f));", + "R[n] = (R[m] < 0) ? (R[m]&0x1f ? UR[n] >> ((-R[m])&0x1f) : 0): (R[n] << (R[m] & 0x1f));", }, { "n", "n", "shll ", "0100nnnn00000000",