2005-04-17 06:20:36 +08:00
|
|
|
#
|
|
|
|
# Makefile for SuperH-specific library files..
|
|
|
|
#
|
|
|
|
|
2009-10-27 23:14:06 +08:00
|
|
|
lib-y = delay.o memmove.o memchr.o \
|
2007-03-28 16:14:45 +08:00
|
|
|
checksum.o strlen.o div64.o div64-generic.o
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2008-11-18 16:33:48 +08:00
|
|
|
# Extracted from libgcc
|
|
|
|
lib-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
|
|
|
|
ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \
|
|
|
|
udiv_qrnnd.o
|
|
|
|
|
sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.
We chan't share code for udivsi3 and udivsi3_i4, because they
have a different clobber list. Copy udivsi3 from gcc-4.1.2.
As shown in arch/sh/lib/udivsi3.S (and -Os.S),
.global __udivsi3_i4i
.global __udivsi3_i4
.global __udivsi3
__udivsi3_i4i:
...
Three symbols are sharing one code, which is actually udivsi3_i4i.
But, this results unwanted code with gcc 4.1.
In gcc, these three are treated as pseudo instructions that have
their own clobber list apart from the usual calling convention.
According to sh's machine description. The clobber list is as
follows:
- udivsi3_i4i : t,r1,pr,mach,macl
- udivsi3_i4 : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
- udivsi3 : t,r4,pr
The caller of udivsi3 will be left with a broken r1 and mac*.
gcc-4.1.x and older(at least to 3.4) generate udivsi3.
ST's gcc-4.1.1 seems to be OK because it has _i4i.
Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-08 10:33:06 +08:00
|
|
|
udivsi3-y := udivsi3_i4i-Os.o
|
2008-11-18 16:33:48 +08:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_CC_OPTIMIZE_FOR_SIZE),y)
|
sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.
We chan't share code for udivsi3 and udivsi3_i4, because they
have a different clobber list. Copy udivsi3 from gcc-4.1.2.
As shown in arch/sh/lib/udivsi3.S (and -Os.S),
.global __udivsi3_i4i
.global __udivsi3_i4
.global __udivsi3
__udivsi3_i4i:
...
Three symbols are sharing one code, which is actually udivsi3_i4i.
But, this results unwanted code with gcc 4.1.
In gcc, these three are treated as pseudo instructions that have
their own clobber list apart from the usual calling convention.
According to sh's machine description. The clobber list is as
follows:
- udivsi3_i4i : t,r1,pr,mach,macl
- udivsi3_i4 : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
- udivsi3 : t,r4,pr
The caller of udivsi3 will be left with a broken r1 and mac*.
gcc-4.1.x and older(at least to 3.4) generate udivsi3.
ST's gcc-4.1.1 seems to be OK because it has _i4i.
Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-08 10:33:06 +08:00
|
|
|
udivsi3-$(CONFIG_CPU_SH3) := udivsi3_i4i.o
|
|
|
|
udivsi3-$(CONFIG_CPU_SH4) := udivsi3_i4i.o
|
2008-11-18 16:33:48 +08:00
|
|
|
endif
|
sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.
We chan't share code for udivsi3 and udivsi3_i4, because they
have a different clobber list. Copy udivsi3 from gcc-4.1.2.
As shown in arch/sh/lib/udivsi3.S (and -Os.S),
.global __udivsi3_i4i
.global __udivsi3_i4
.global __udivsi3
__udivsi3_i4i:
...
Three symbols are sharing one code, which is actually udivsi3_i4i.
But, this results unwanted code with gcc 4.1.
In gcc, these three are treated as pseudo instructions that have
their own clobber list apart from the usual calling convention.
According to sh's machine description. The clobber list is as
follows:
- udivsi3_i4i : t,r1,pr,mach,macl
- udivsi3_i4 : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
- udivsi3 : t,r4,pr
The caller of udivsi3 will be left with a broken r1 and mac*.
gcc-4.1.x and older(at least to 3.4) generate udivsi3.
ST's gcc-4.1.1 seems to be OK because it has _i4i.
Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-08 10:33:06 +08:00
|
|
|
udivsi3-y += udivsi3.o
|
2008-11-18 16:33:48 +08:00
|
|
|
|
2008-06-18 06:30:53 +08:00
|
|
|
obj-y += io.o
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
memcpy-y := memcpy.o
|
|
|
|
memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o
|
|
|
|
|
2009-10-27 23:14:06 +08:00
|
|
|
memset-y := memset.o
|
|
|
|
memset-$(CONFIG_CPU_SH4) := memset-sh4.o
|
|
|
|
|
2009-07-27 19:55:46 +08:00
|
|
|
lib-$(CONFIG_MMU) += copy_page.o __clear_user.o
|
2009-07-11 18:56:58 +08:00
|
|
|
lib-$(CONFIG_MCOUNT) += mcount.o
|
2009-10-27 23:14:06 +08:00
|
|
|
lib-y += $(memcpy-y) $(memset-y) $(udivsi3-y)
|
2007-11-06 16:35:12 +08:00
|
|
|
|
|
|
|
EXTRA_CFLAGS += -Werror
|