Skip to content

Commit

Permalink
Blackfin: fix miscompilation in lshrdi3
Browse files Browse the repository at this point in the history
The code used in the Blackfin lshrdi3 utilizes gcc constructs.  However,
the structures declared don't line up with the code gcc generates, so
under certain optimizations, we get bad code and things crap out in fun
random ways.  So rather than trying to maintain different gcc definitions
ourselves, just use the ones available in gcclib.h.

URL: http://blackfin.uclinux.org/gf/tracker/5286
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Jie Zhang authored and Mike Frysinger committed Jul 16, 2009
1 parent dc437b1 commit 8399a74
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions arch/blackfin/lib/lshrdi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#define BITS_PER_UNIT 8

typedef int SItype __attribute__ ((mode(SI)));
typedef unsigned int USItype __attribute__ ((mode(SI)));
typedef int DItype __attribute__ ((mode(DI)));
typedef int word_type __attribute__ ((mode(__word__)));

struct DIstruct {
SItype high, low;
};

typedef union {
struct DIstruct s;
DItype ll;
} DIunion;
#include "gcclib.h"

#ifdef CONFIG_ARITHMETIC_OPS_L1
DItype __lshrdi3(DItype u, word_type b)__attribute__((l1_text));
Expand Down

0 comments on commit 8399a74

Please sign in to comment.