summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-08-09 16:17:24 +0200
committerKoen Kooi <koen@openembedded.org>2009-08-09 16:17:24 +0200
commit96efe18731e6dddf5fedbe90478fcf9565155081 (patch)
treecde9e1a254386a1f770a60ee24fc9ba2fb0633af /recipes
parent2215a06d3408f57cf4edd5a072132333111c3830 (diff)
parent7e5dace40c5966a27c62e7b893bf29aded35e3c1 (diff)
Merge branch 'org.openembedded.dev' of git@git.openembedded.org:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes')
-rw-r--r--recipes/eglibc/eglibc-package.bbclass15
-rw-r--r--recipes/eglibc/eglibc.inc2
-rw-r--r--recipes/gcc/gcc-4.4.1.inc4
-rw-r--r--recipes/gcc/gcc-4.4.1/gcc-disable-linux-unwind-with-libc-inhibit.patch35
-rw-r--r--recipes/gmp/gmp_4.2.4.bb2
-rw-r--r--recipes/gnome/gedit_2.26.2.bb2
-rw-r--r--recipes/gobby/gobby_0.4.1.bb3
-rw-r--r--recipes/gobby/gtksourceview_1.7.2.bb9
-rw-r--r--recipes/gtksourceview/gtksourceview1_1.7.2.bb16
-rw-r--r--recipes/justreader/files/missing-include.patch10
-rw-r--r--recipes/justreader/justreader_2.0k.bb3
-rw-r--r--recipes/libfribidi/fribidi_0.19.2.bb15
-rw-r--r--recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch58
-rw-r--r--recipes/lilo-sh/lilo-sh_21.bb6
-rw-r--r--recipes/linux/linux-titan-sh4-2.6.21/linux-sh-__sdivsi3_i4i.patch684
-rw-r--r--recipes/linux/linux-titan-sh4_2.6.21.bb4
-rw-r--r--recipes/meta/meta-toolchain-qte.bb6
-rw-r--r--recipes/pciutils/pciutils_3.1.2.bb6
-rw-r--r--recipes/pkgconfig/pkgconfig_0.23.bb2
-rw-r--r--recipes/qt4/qt4-embedded.inc4
-rw-r--r--recipes/qt4/qt4-tools-sdk_4.5.2.bb9
-rw-r--r--recipes/qt4/qt4-x11-free.inc4
-rw-r--r--recipes/tasks/task-qte-toolchain-target.bb33
-rw-r--r--recipes/tea/tea_17.3.5.bb4
-rw-r--r--recipes/u-boot/u-boot-mkimage-openmoko-native_oe.bb2
-rw-r--r--recipes/uclibc/uclibc-0.9.30.1/gcc-4.4-fixlet.patch31
-rw-r--r--recipes/uclibc/uclibc_0.9.30.1.bb1
-rw-r--r--recipes/xcalibrate/xcalibrate_git.bb3
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1300_1.3.0.0.bb2
29 files changed, 927 insertions, 48 deletions
diff --git a/recipes/eglibc/eglibc-package.bbclass b/recipes/eglibc/eglibc-package.bbclass
index d8ac4f4e86..7843d9f668 100644
--- a/recipes/eglibc/eglibc-package.bbclass
+++ b/recipes/eglibc/eglibc-package.bbclass
@@ -29,7 +29,7 @@ BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc"
PACKAGES = "eglibc-dbg eglibc catchsegv sln nscd ldd localedef eglibc-utils eglibc-dev eglibc-doc eglibc-locale libsegfault eglibc-extra-nss eglibc-thread-db eglibc-pcprofile"
PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* locale-base-*"
-RPROVIDES_eglibc = "glibc"
+RPROVIDES_eglibc = "glibc tzdata"
RPROVIDES_eglibc-utils = "glibc-utils"
RPROVIDES_eglibc-dev = "glibc-dev"
RPROVIDES_eglibc-doc = "glibc-doc"
@@ -38,13 +38,12 @@ RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
RPROVIDES_eglibc-thread-db = "glibc-thread-db"
RPROVIDES_eglibc-pcprofile = "glibc-pcprofile"
RPROVIDES_eglibc-dbg = "glibc-dbg"
-
-libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
+libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir}/* ${datadir}/zoneinfo"
FILES_ldd = "${bindir}/ldd"
-FILES_libsegfault = "/lib/libSegFault*"
-FILES_eglibc-extra-nss = "/lib/libnss*"
+FILES_libsegfault = "${base_libdir}/libSegFault*"
+FILES_eglibc-extra-nss = "${base_libdir}/libnss*"
FILES_sln = "/sbin/sln"
FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
FILES_nscd = "${sbindir}/nscd*"
@@ -53,8 +52,8 @@ FILES_eglibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
-FILES_eglibc-pcprofile = "/lib/libpcprofile.so"
-FILES_eglibc-thread-db = "/lib/libthread_db*"
+FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so"
+FILES_eglibc-thread-db = "${base_libdir}/libthread_db*"
FILES_localedef = "${bindir}/localedef"
RPROVIDES_eglibc-dev += "libc-dev"
@@ -153,7 +152,7 @@ do_prep_locale_tree() {
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
- ls ${D}/lib/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
+ ls ${D}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
fi
diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc
index 7863aacc89..1ca0c6264f 100644
--- a/recipes/eglibc/eglibc.inc
+++ b/recipes/eglibc/eglibc.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
SECTION = "libs"
PRIORITY = "required"
LICENSE = "LGPL"
-INC_PR = "r4"
+INC_PR = "r5"
# nptl needs unwind support in gcc, which can't be built without glibc.
DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
#this leads to circular deps, so lets not add it yet
diff --git a/recipes/gcc/gcc-4.4.1.inc b/recipes/gcc/gcc-4.4.1.inc
index e05da2b5a0..a5b9d918e4 100644
--- a/recipes/gcc/gcc-4.4.1.inc
+++ b/recipes/gcc/gcc-4.4.1.inc
@@ -14,7 +14,9 @@ FILESPATHPKG .= ":gcc-$PV"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
file://100-uclibc-conf.patch;patch=1 \
- "
+ file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \
+ file://gcc-disable-linux-unwind-with-libc-inhibit.patch;patch=1 \
+ "
# Language Overrides
FORTRAN = ""
JAVA = ""
diff --git a/recipes/gcc/gcc-4.4.1/gcc-disable-linux-unwind-with-libc-inhibit.patch b/recipes/gcc/gcc-4.4.1/gcc-disable-linux-unwind-with-libc-inhibit.patch
new file mode 100644
index 0000000000..a6ba7a70ab
--- /dev/null
+++ b/recipes/gcc/gcc-4.4.1/gcc-disable-linux-unwind-with-libc-inhibit.patch
@@ -0,0 +1,35 @@
+Backport this patch
+
+2009-04-02 Andrew Stubbs <ams@codesourcery.com>
+
+ * config/sh/linux-unwind.h: Disable when inhibit_libc is defined.
+
+
+http://gcc.gnu.org/viewcvs?view=rev&revision=145442
+
+To get gcc compiled for SH
+
+-Khem
+Index: gcc-4.4.1/gcc/config/sh/linux-unwind.h
+===================================================================
+--- gcc-4.4.1.orig/gcc/config/sh/linux-unwind.h 2009-08-08 10:21:35.943210469 -0700
++++ gcc-4.4.1/gcc/config/sh/linux-unwind.h 2009-08-08 10:22:18.643210817 -0700
+@@ -24,7 +24,11 @@
+
+
+ /* Do code reading to identify a signal frame, and set the frame
+- state data appropriately. See unwind-dw2.c for the structs. */
++ state data appropriately. See unwind-dw2.c for the structs.
++ Don't use this at all if inhibit_libc is used. */
++
++#ifndef inhibit_libc
++
+
+ #include <signal.h>
+ #include <sys/ucontext.h>
+@@ -248,3 +252,5 @@
+ return _URC_NO_REASON;
+ }
+ #endif /* defined (__SH5__) */
++
++#endif /* inhibit_libc */
diff --git a/recipes/gmp/gmp_4.2.4.bb b/recipes/gmp/gmp_4.2.4.bb
index a9c14e6a3f..9aa5bf8edc 100644
--- a/recipes/gmp/gmp_4.2.4.bb
+++ b/recipes/gmp/gmp_4.2.4.bb
@@ -1,5 +1,5 @@
INC_PR = "r0"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.4"
SRC_URI_append += "file://sh4-asmfix.patch;patch=1 \
file://use-includedir.patch;patch=1 \
diff --git a/recipes/gnome/gedit_2.26.2.bb b/recipes/gnome/gedit_2.26.2.bb
index a0585f10e6..10e5b54f97 100644
--- a/recipes/gnome/gedit_2.26.2.bb
+++ b/recipes/gnome/gedit_2.26.2.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "GNOME editor"
SECTION = "x11/gnome"
LICENSE = "GPL"
-DEPENDS = "gnome-common glib-2.0 gtk+ gconf gtksourceview2"
+DEPENDS = "iso-codes gnome-common glib-2.0 gtk+ gconf gtksourceview2"
RDEPENDS += " gtksourceview2"
inherit gnome pkgconfig
diff --git a/recipes/gobby/gobby_0.4.1.bb b/recipes/gobby/gobby_0.4.1.bb
index f9474c8fe3..87f0fb9c5e 100644
--- a/recipes/gobby/gobby_0.4.1.bb
+++ b/recipes/gobby/gobby_0.4.1.bb
@@ -1,7 +1,8 @@
LICENSE = "LGPL"
HOMEPAGE = "http://darcs.0x539.de/trac/obby/cgi-bin/trac.cgi/wiki/"
+PR = "r1"
-DEPENDS = "net6 gtkmm obby gtksourceview libxml++"
+DEPENDS = "net6 gtkmm obby gtksourceview1 libxml++"
inherit autotools pkgconfig
SRC_URI = "http://releases.0x539.de/gobby/gobby-${PV}.tar.gz"
diff --git a/recipes/gobby/gtksourceview_1.7.2.bb b/recipes/gobby/gtksourceview_1.7.2.bb
deleted file mode 100644
index 6b4c8e686c..0000000000
--- a/recipes/gobby/gtksourceview_1.7.2.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-LICENSE = "GPL"
-
-DEPENDS = "gtk+ libgnomeprint"
-
-inherit gnome pkgconfig
-
-do_stage() {
-autotools_stage_all
-}
diff --git a/recipes/gtksourceview/gtksourceview1_1.7.2.bb b/recipes/gtksourceview/gtksourceview1_1.7.2.bb
new file mode 100644
index 0000000000..44d88fb80d
--- /dev/null
+++ b/recipes/gtksourceview/gtksourceview1_1.7.2.bb
@@ -0,0 +1,16 @@
+LICENSE = "GPL"
+
+PNAME = "gtksourceview"
+
+DEPENDS = "gtk+ libgnomeprint"
+
+S = "${WORKDIR}/${PNAME}-${PV}"
+
+inherit gnome pkgconfig
+
+# overrule SRC_URI from gnome.conf
+SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2"
+
+do_stage() {
+autotools_stage_all
+}
diff --git a/recipes/justreader/files/missing-include.patch b/recipes/justreader/files/missing-include.patch
new file mode 100644
index 0000000000..4831f3847b
--- /dev/null
+++ b/recipes/justreader/files/missing-include.patch
@@ -0,0 +1,10 @@
+--- a/shcm.cpp 2009-05-25 09:07:19.928704817 +0200
++++ b/shcm.cpp 2009-05-25 09:07:38.225747505 +0200
+@@ -19,6 +19,7 @@
+ ****************************************************************************/
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <vector>
+
+ #include "shcm.h"
diff --git a/recipes/justreader/justreader_2.0k.bb b/recipes/justreader/justreader_2.0k.bb
index f3f71493fc..e05baf710f 100644
--- a/recipes/justreader/justreader_2.0k.bb
+++ b/recipes/justreader/justreader_2.0k.bb
@@ -6,7 +6,8 @@ HOMEPAGE = "http://justreader.sourceforge.net/"
PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/justreader/justreader_${PV}.tgz \
-file://correct-settings-path.patch;patch=1"
+file://correct-settings-path.patch;patch=1 \
+file://missing-include.patch;patch=1"
S = "${WORKDIR}/TextReader2"
diff --git a/recipes/libfribidi/fribidi_0.19.2.bb b/recipes/libfribidi/fribidi_0.19.2.bb
new file mode 100644
index 0000000000..1e12c98545
--- /dev/null
+++ b/recipes/libfribidi/fribidi_0.19.2.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Fribidi library for bidirectional text"
+SECTION = "libs"
+PRIORITY = "optional"
+
+PROVIDES = "libfribidi"
+
+# Slightly incompatible with 0.10.x, so:
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_angstrom = "1"
+
+inherit autotools_stage lib_package pkgconfig
+
+CFLAGS_append = " -DPAGE_SIZE=4096 "
+
+SRC_URI = "http://fribidi.org/download/fribidi-${PV}.tar.gz"
diff --git a/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch b/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch
new file mode 100644
index 0000000000..8d80040e08
--- /dev/null
+++ b/recipes/lilo-sh/files/lilo-replace-PAGE_SIZE.patch
@@ -0,0 +1,58 @@
+Index: lilo/boot.c
+===================================================================
+--- lilo.orig/boot.c 2009-08-08 19:09:05.779211145 -0700
++++ lilo/boot.c 2009-08-08 19:15:45.111207238 -0700
+@@ -21,6 +21,7 @@
+ #include "map.h"
+ #include "partition.h"
+ #include "boot.h"
++#include <linux/genhd.h>
+
+
+ static GEOMETRY geo;
+@@ -64,9 +65,9 @@
+ if (!modern_kernel || !(hdr.flags & LFLAG_HIGH))
+ check_size(spec,setup,sectors);
+ else {
+- if (hdr.start % PAGE_SIZE)
++ if (hdr.start % getpagesize())
+ die("Can't load kernel at mis-aligned address 0x%08lx\n",hdr.start);
+- descr->start_page = hdr.start/PAGE_SIZE; /* load kernel high */
++ descr->start_page = hdr.start/getpagesize(); /* load kernel high */
+ }
+ geo_close(&geo);
+ if (verbose > 1)
+@@ -161,7 +162,6 @@
+ cfg_unset(cf_other,"map-drive");
+ }
+
+-
+ #define PART(s,n) (((struct partition *) (s)[0].par_c.ptable)[(n)])
+
+
+Index: lilo/lilo.c
+===================================================================
+--- lilo.orig/lilo.c 2009-08-08 19:09:05.779211145 -0700
++++ lilo/lilo.c 2009-08-08 19:09:06.135205054 -0700
+@@ -154,7 +154,7 @@
+ printf(" Kernel is loaded \"low\"\n");
+ else printf(" Kernel is loaded \"high\", at 0x%08lx\n",
+ (unsigned long) descrs.d.descr[image].start_page*
+- PAGE_SIZE);
++ getpagesize());
+ if (!*(unsigned long *) descrs.d.descr[image].rd_size)
+ printf(" No initial RAM disk\n");
+ else printf(" Initial RAM disk is %ld bytes\n",
+Index: lilo/Makefile
+===================================================================
+--- lilo.orig/Makefile 2009-08-08 19:45:05.247206997 -0700
++++ lilo/Makefile 2009-08-08 19:45:18.759234365 -0700
+@@ -24,7 +24,7 @@
+ # VARSETUP Enables use of variable-size setup segments.
+ # XL_SECS=n Support for extra large (non-standard) floppies.
+
+-CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE -DLARGE_EBDA -DONE_SHOT
++CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE -DLARGE_EBDA -DONE_SHOT -DCONFIG_BLOCK
+
+ # End of configuration variables
+
diff --git a/recipes/lilo-sh/lilo-sh_21.bb b/recipes/lilo-sh/lilo-sh_21.bb
index cc4fbac8a7..038573209a 100644
--- a/recipes/lilo-sh/lilo-sh_21.bb
+++ b/recipes/lilo-sh/lilo-sh_21.bb
@@ -12,7 +12,7 @@ the kernel. LILO can also boot other operating systems. LILO-sh is a \
port of LILO to the SH processor."
SECTION = "bootloaders"
LICENSE = "MIT"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://twibble.org/dist/sh4/src/lilosh/lilo-21.tar.gz \
file://lilo-0.21-include.patch;patch=1 \
@@ -23,7 +23,9 @@ SRC_URI = "http://twibble.org/dist/sh4/src/lilosh/lilo-21.tar.gz \
file://lilo-0.21-second.patch;patch=1;pnum=0 \
file://lilo-sh-linux.patch;patch=1 \
file://lilo-linkgear.patch;patch=1 \
- file://lilo-noconfig-h.patch;patch=1"
+ file://lilo-noconfig-h.patch;patch=1 \
+ file://lilo-replace-PAGE_SIZE.patch;patch=1 \
+ "
S = "${WORKDIR}/lilo"
diff --git a/recipes/linux/linux-titan-sh4-2.6.21/linux-sh-__sdivsi3_i4i.patch b/recipes/linux/linux-titan-sh4-2.6.21/linux-sh-__sdivsi3_i4i.patch
new file mode 100644
index 0000000000..057bfc196d
--- /dev/null
+++ b/recipes/linux/linux-titan-sh4-2.6.21/linux-sh-__sdivsi3_i4i.patch
@@ -0,0 +1,684 @@
+Index: linux-2.6.21/arch/sh/kernel/sh_ksyms.c
+===================================================================
+--- linux-2.6.21.orig/arch/sh/kernel/sh_ksyms.c 2009-08-08 16:52:36.627208225 -0700
++++ linux-2.6.21/arch/sh/kernel/sh_ksyms.c 2009-08-08 16:55:12.488253830 -0700
+@@ -82,6 +82,8 @@
+ DECLARE_EXPORT(__movmem_i4_even);
+ DECLARE_EXPORT(__movmem_i4_odd);
+ DECLARE_EXPORT(__movmemSI12_i4);
++DECLARE_EXPORT(__sdivsi3_i4i);
++DECLARE_EXPORT(__udivsi3_i4i);
+ #else /* GCC 3.x */
+ DECLARE_EXPORT(__movstr_i4_even);
+ DECLARE_EXPORT(__movstr_i4_odd);
+Index: linux-2.6.21/arch/sh/lib/udivsi3_i4i.S
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.21/arch/sh/lib/udivsi3_i4i.S 2009-08-08 16:56:38.980208882 -0700
+@@ -0,0 +1,666 @@
++/* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
++ 2004, 2005, 2006
++ Free Software Foundation, Inc.
++
++This file is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file into combinations with other programs,
++and to distribute those combinations without any restriction coming
++from the use of this file. (The General Public License restrictions
++do apply in other respects; for example, they cover modification of
++the file, and distribution when not linked into a combine
++executable.)
++
++This file is distributed in the hope that it will be useful, but
++WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING. If not, write to
++the Free Software Foundation, 51 Franklin Street, Fifth Floor,
++Boston, MA 02110-1301, USA. */
++
++!! libgcc routines for the Renesas / SuperH SH CPUs.
++!! Contributed by Steve Chamberlain.
++!! sac@cygnus.com
++
++!! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___lshrsi3 routines
++!! recoded in assembly by Toshiyasu Morita
++!! tm@netcom.com
++
++/* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
++ ELF local label prefixes by J"orn Rennecke
++ amylaar@cygnus.com */
++
++/* This code used shld, thus is not suitable for SH1 / SH2. */
++
++/* Signed / unsigned division without use of FPU, optimized for SH4.
++ Uses a lookup table for divisors in the range -128 .. +128, and
++ div1 with case distinction for larger divisors in three more ranges.
++ The code is lumped together with the table to allow the use of mova. */
++#ifdef CONFIG_CPU_LITTLE_ENDIAN
++#define L_LSB 0
++#define L_LSWMSB 1
++#define L_MSWLSB 2
++#else
++#define L_LSB 3
++#define L_LSWMSB 2
++#define L_MSWLSB 1
++#endif
++
++ .balign 4
++ .global __udivsi3_i4i
++ .global __udivsi3_i4
++ .set __udivsi3_i4, __udivsi3_i4i
++ .type __udivsi3_i4i, @function
++__udivsi3_i4i:
++ mov.w c128_w, r1
++ div0u
++ mov r4,r0
++ shlr8 r0
++ cmp/hi r1,r5
++ extu.w r5,r1
++ bf udiv_le128
++ cmp/eq r5,r1
++ bf udiv_ge64k
++ shlr r0
++ mov r5,r1
++ shll16 r5
++ mov.l r4,@-r15
++ div1 r5,r0
++ mov.l r1,@-r15
++ div1 r5,r0
++ div1 r5,r0
++ bra udiv_25
++ div1 r5,r0
++
++div_le128:
++ mova div_table_ix,r0
++ bra div_le128_2
++ mov.b @(r0,r5),r1
++udiv_le128:
++ mov.l r4,@-r15
++ mova div_table_ix,r0
++ mov.b @(r0,r5),r1
++ mov.l r5,@-r15
++div_le128_2:
++ mova div_table_inv,r0
++ mov.l @(r0,r1),r1
++ mov r5,r0
++ tst #0xfe,r0
++ mova div_table_clz,r0
++ dmulu.l r1,r4
++ mov.b @(r0,r5),r1
++ bt/s div_by_1
++ mov r4,r0
++ mov.l @r15+,r5
++ sts mach,r0
++ /* clrt */
++ addc r4,r0
++ mov.l @r15+,r4
++ rotcr r0
++ rts
++ shld r1,r0
++
++div_by_1_neg:
++ neg r4,r0
++div_by_1:
++ mov.l @r15+,r5
++ rts
++ mov.l @r15+,r4
++
++div_ge64k:
++ bt/s div_r8
++ div0u
++ shll8 r5
++ bra div_ge64k_2
++ div1 r5,r0
++udiv_ge64k:
++ cmp/hi r0,r5
++ mov r5,r1
++ bt udiv_r8
++ shll8 r5
++ mov.l r4,@-r15
++ div1 r5,r0
++ mov.l r1,@-r15
++div_ge64k_2:
++ div1 r5,r0
++ mov.l zero_l,r1
++ .rept 4
++ div1 r5,r0
++ .endr
++ mov.l r1,@-r15
++ div1 r5,r0
++ mov.w m256_w,r1
++ div1 r5,r0
++ mov.b r0,@(L_LSWMSB,r15)
++ xor r4,r0
++ and r1,r0
++ bra div_ge64k_end
++ xor r4,r0
++
++div_r8:
++ shll16 r4
++ bra div_r8_2
++ shll8 r4
++udiv_r8:
++ mov.l r4,@-r15
++ shll16 r4
++ clrt
++ shll8 r4
++ mov.l r5,@-r15
++div_r8_2:
++ rotcl r4
++ mov r0,r1
++ div1 r5,r1
++ mov r4,r0
++ rotcl r0
++ mov r5,r4
++ div1 r5,r1
++ .rept 5
++ rotcl r0; div1 r5,r1
++ .endr
++ rotcl r0
++ mov.l @r15+,r5
++ div1 r4,r1
++ mov.l @r15+,r4
++ rts
++ rotcl r0
++
++ .global __sdivsi3_i4i
++ .global __sdivsi3_i4
++ .global __sdivsi3
++ .set __sdivsi3_i4, __sdivsi3_i4i
++ .set __sdivsi3, __sdivsi3_i4i
++ .type __sdivsi3_i4i, @function
++ /* This is link-compatible with a __sdivsi3 call,
++ but we effectively clobber only r1. */
++__sdivsi3_i4i:
++ mov.l r4,@-r15
++ cmp/pz r5
++ mov.w c128_w, r1
++ bt/s pos_divisor
++ cmp/pz r4
++ mov.l r5,@-r15
++ neg r5,r5
++ bt/s neg_result
++ cmp/hi r1,r5
++ neg r4,r4
++pos_result:
++ extu.w r5,r0
++ bf div_le128
++ cmp/eq r5,r0
++ mov r4,r0
++ shlr8 r0
++ bf/s div_ge64k
++ cmp/hi r0,r5
++ div0u
++ shll16 r5
++ div1 r5,r0
++ div1 r5,r0
++ div1 r5,r0
++udiv_25:
++ mov.l zero_l,r1
++ div1 r5,r0
++ div1 r5,r0
++ mov.l r1,@-r15
++ .rept 3
++ div1 r5,r0
++ .endr
++ mov.b r0,@(L_MSWLSB,r15)
++ xtrct r4,r0
++ swap.w r0,r0
++ .rept 8
++ div1 r5,r0
++ .endr
++ mov.b r0,@(L_LSWMSB,r15)
++div_ge64k_end:
++ .rept 8
++ div1 r5,r0
++ .endr
++ mov.l @r15+,r4 ! zero-extension and swap using LS unit.
++ extu.b r0,r0
++ mov.l @r15+,r5
++ or r4,r0
++ mov.l @r15+,r4
++ rts
++ rotcl r0
++
++div_le128_neg:
++ tst #0xfe,r0
++ mova div_table_ix,r0
++ mov.b @(r0,r5),r1
++ mova div_table_inv,r0
++ bt/s div_by_1_neg
++ mov.l @(r0,r1),r1
++ mova div_table_clz,r0
++ dmulu.l r1,r4
++ mov.b @(r0,r5),r1
++ mov.l @r15+,r5
++ sts mach,r0
++ /* clrt */
++ addc r4,r0
++ mov.l @r15+,r4
++ rotcr r0
++ shld r1,r0
++ rts
++ neg r0,r0
++
++pos_divisor:
++ mov.l r5,@-r15
++ bt/s pos_result
++ cmp/hi r1,r5
++ neg r4,r4
++neg_result:
++ extu.w r5,r0
++ bf div_le128_neg
++ cmp/eq r5,r0
++ mov r4,r0
++ shlr8 r0
++ bf/s div_ge64k_neg
++ cmp/hi r0,r5
++ div0u
++ mov.l zero_l,r1
++ shll16 r5
++ div1 r5,r0
++ mov.l r1,@-r15
++ .rept 7
++ div1 r5,r0
++ .endr
++ mov.b r0,@(L_MSWLSB,r15)
++ xtrct r4,r0
++ swap.w r0,r0
++ .rept 8
++ div1 r5,r0
++ .endr
++ mov.b r0,@(L_LSWMSB,r15)
++div_ge64k_neg_end:
++ .rept 8
++ div1 r5,r0
++ .endr
++ mov.l @r15+,r4 ! zero-extension and swap using LS unit.
++ extu.b r0,r1
++ mov.l @r15+,r5
++ or r4,r1
++div_r8_neg_end:
++ mov.l @r15+,r4
++ rotcl r1
++ rts
++ neg r1,r0
++
++div_ge64k_neg:
++ bt/s div_r8_neg
++ div0u
++ shll8 r5
++ mov.l zero_l,r1
++ .rept 6
++ div1 r5,r0
++ .endr
++ mov.l r1,@-r15
++ div1 r5,r0
++ mov.w m256_w,r1
++ div1 r5,r0
++ mov.b r0,@(L_LSWMSB,r15)
++ xor r4,r0
++ and r1,r0
++ bra div_ge64k_neg_end
++ xor r4,r0
++
++c128_w:
++ .word 128
++
++div_r8_neg:
++ clrt
++ shll16 r4
++ mov r4,r1
++ shll8 r1
++ mov r5,r4
++ .rept 7
++ rotcl r1; div1 r5,r0
++ .endr
++ mov.l @r15+,r5
++ rotcl r1
++ bra div_r8_neg_end
++ div1 r4,r0
++
++m256_w:
++ .word 0xff00
++/* This table has been generated by divtab-sh4.c. */
++ .balign 4
++div_table_clz:
++ .byte 0
++ .byte 1
++ .byte 0
++ .byte -1
++ .byte -1
++ .byte -2
++ .byte -2
++ .byte -2
++ .byte -2
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -3
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -4
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -5
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++ .byte -6
++/* Lookup table translating positive divisor to index into table of
++ normalized inverse. N.B. the '0' entry is also the last entry of the
++ previous table, and causes an unaligned access for division by zero. */
++div_table_ix:
++ .byte -6
++ .byte -128
++ .byte -128
++ .byte 0
++ .byte -128
++ .byte -64
++ .byte 0
++ .byte 64
++ .byte -128
++ .byte -96
++ .byte -64
++ .byte -32
++ .byte 0
++ .byte 32
++ .byte 64
++ .byte 96
++ .byte -128
++ .byte -112
++ .byte -96
++ .byte -80
++ .byte -64
++ .byte -48
++ .byte -32
++ .byte -16
++ .byte 0
++ .byte 16
++ .byte 32
++ .byte 48
++ .byte 64
++ .byte 80
++ .byte 96
++ .byte 112
++ .byte -128
++ .byte -120
++ .byte -112
++ .byte -104
++ .byte -96
++ .byte -88
++ .byte -80
++ .byte -72
++ .byte -64
++ .byte -56
++ .byte -48
++ .byte -40
++ .byte -32
++ .byte -24
++ .byte -16
++ .byte -8
++ .byte 0
++ .byte 8
++ .byte 16
++ .byte 24
++ .byte 32
++ .byte 40
++ .byte 48
++ .byte 56
++ .byte 64
++ .byte 72
++ .byte 80
++ .byte 88
++ .byte 96
++ .byte 104
++ .byte 112
++ .byte 120
++ .byte -128
++ .byte -124
++ .byte -120
++ .byte -116
++ .byte -112
++ .byte -108
++ .byte -104
++ .byte -100
++ .byte -96
++ .byte -92
++ .byte -88
++ .byte -84
++ .byte -80
++ .byte -76
++ .byte -72
++ .byte -68
++ .byte -64
++ .byte -60
++ .byte -56
++ .byte -52
++ .byte -48
++ .byte -44
++ .byte -40
++ .byte -36
++ .byte -32
++ .byte -28
++ .byte -24
++ .byte -20
++ .byte -16
++ .byte -12
++ .byte -8
++ .byte -