aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-06-28 13:19:36 +0000
committerMike Frysinger <vapier@gentoo.org>2009-07-16 01:52:23 -0400
commit8399a74f61c69c7d233924de3dd314ca0effa16a (patch)
treee5fd4a027e4c61db266a9d4bc4fd34f8b8fd0c8c /arch
parentdc437b1b596e310bb583de3868c3d61a6798c81c (diff)
Blackfin: fix miscompilation in lshrdi3
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/lib/lshrdi3.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/blackfin/lib/lshrdi3.c b/arch/blackfin/lib/lshrdi3.c
index 84b9c559222..e57bf6fbdf3 100644
--- a/arch/blackfin/lib/lshrdi3.c
+++ b/arch/blackfin/lib/lshrdi3.c
@@ -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));