Provide __movmemSI12_i4 (gcc4) a.k.a. __movstrSI12_i4 (gcc3) that gcc

emits for sh4 to copy 12 bytes at certain optimization levels.
Discovered by compiling landisk kernel with -Os.

Use gcc3 naming ("movstr") to match the rest of the "movstr" files.
This commit is contained in:
uwe 2007-03-14 22:22:53 +00:00
parent 91e99f33d3
commit eaa25d5966
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.15 2005/12/11 12:24:44 christos Exp $
# $NetBSD: Makefile.inc,v 1.16 2007/03/14 22:22:53 uwe Exp $
SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
ffs.S scanc.c skpc.c \
@ -7,4 +7,4 @@ SRCS+= __main.c imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
strncpy.c random.c __assert.c memchr.c memcmp.c memset.S \
memmove.S memcpy.S byte_swap_2.S byte_swap_4.S byte_swap_8.S \
ashiftrt.S ashlsi3.S ashrsi3.S lshrsi3.S movstr.S movstr_i4.S \
movstrSI.S mulsi3.S sdivsi3.S udivsi3.S
movstrSI.S movstrSI12_i4.S mulsi3.S sdivsi3.S udivsi3.S

View File

@ -0,0 +1,16 @@
/* $NetBSD: movstrSI12_i4.S,v 1.1 2007/03/14 22:22:53 uwe Exp $ */
#include <machine/asm.h>
NENTRY(__movstrSI12_i4)
mov.l @r5, r0
mov.l @(4, r5), r1
mov.l @(8, r5), r2
mov.l r0, @r4
mov.l r1, @(4, r4)
rts
mov.l r2, @(8, r4)
/* gcc4 uses movmem, older versions use movstr */
STRONG_ALIAS(__movmemSI12_i4, __movstrSI12_i4)