linux-kernel-test/arch
Arjan van de Ven ff60fab71b x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy
GCC provides reasonable memset/memcpy functions itself, with __builtin_memset
and __builtin_memcpy. For the "unknown" cases, it'll fall back to our
current existing functions, but for fixed size versions it'll inline
something smart. Quite often that will be the same as we have now,
but sometimes it can do something smarter (for example, if the code
then sets the first member of a struct, it can do a shorter memset).

In addition, and this is more important, gcc knows which registers and
such are not clobbered (while for our asm version it pretty much
acts like a compiler barrier), so for various cases it can avoid reloading
values.

The effect on codesize is shown below on my typical laptop .config:

   text	   data	    bss	    dec	    hex	filename
5605675	2041100	6525148	14171923	 d83f13	vmlinux.before
5595849	2041668	6525148	14162665	 d81ae9	vmlinux.after

Due to some not-so-good behavior in the gcc 3.x series, this change
is only done for GCC 4.x and above.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20090928142122.6fc57e9c@infradead.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-09-28 16:43:15 -07:00
..
alpha alpha: convert to asm-generic/hardirq.h 2009-09-22 07:17:43 -07:00
arm Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 2009-09-23 11:25:16 -07:00
avr32 mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
blackfin Blackfin: override text/data checking functions 2009-09-23 07:39:32 -07:00
cris mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
frv FRV: Use asm/generic-hardirq.h 2009-09-23 10:15:21 -07:00
h8300 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-09-22 07:51:45 -07:00
ia64 Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
m32r m32r: convert to asm-generic/hardirq.h 2009-09-22 07:17:43 -07:00
m68k m68k: convert to asm-generic/hardirq.h 2009-09-22 07:17:44 -07:00
m68knommu perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
microblaze arches: drop superfluous casts in nr_free_pages() callers 2009-09-22 07:17:34 -07:00
mips kcore: use registerd physmem information 2009-09-23 07:39:41 -07:00
mn10300 MN10300: Handle removal of struct uart_info 2009-09-23 10:15:21 -07:00
parisc mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
powerpc Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-23 09:46:15 -07:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2009-09-23 10:02:14 -07:00
score score: Cleanup linker script using new macros. 2009-09-23 13:41:15 +08:00
sh kcore: use registerd physmem information 2009-09-23 07:39:41 -07:00
sparc BUILD_BUG_ON(): fix it and a couple of bogus uses of it 2009-09-23 07:39:29 -07:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-09-22 07:51:45 -07:00
x86 x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy 2009-09-28 16:43:15 -07:00
xtensa mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
.gitignore
Kconfig oprofile: fix oprofile regression: select RING_BUFFER_ALLOW_SWAP 2009-09-17 15:53:42 -04:00