Commit Graph

18 Commits

Author SHA1 Message Date
Pedro F. Giffuni
5b1674597f gcc: upstream alignment cleanups.
This solves GCC/32617 and contributes to reduce differences with
Apple's gcc42.

Complete some references in the ChangeLog while here.

Obtained from:	gcc 4.3 (rev. 126529, 126588; GPLv2)
MFC after:	3 weeks
2013-11-29 18:46:02 +00:00
Pedro F. Giffuni
2bd5e058b7 gcc: another round of merges from the gcc pre-43 branch.
Bring The following revisions from the gcc43 branch[1]:

118360, 118361, 118363, 118576, 119820,
123906, 125246, and 125721.

They all have in common that the were merged long ago
into Apple's gcc and should help improve the general
quality of the compiler and make it easier to bring
new features from Apple's gcc42.

For details please review the additions to the files:
gcc/ChangeLog.gcc43
gcc/cp/ChangeLog.gcc43 (new, adds previous revisions)

Reference:
[1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700

Obtained from:	gcc pre4.3 (GPLv2) branch
MFC after:	3 weeks
2013-11-21 16:38:57 +00:00
Pedro F. Giffuni
a6c34d9e26 Revert r236962 - Experimental amdfam10/barcelona support.
The patches are unexpectedly causing gcc to fail while
building ports/graphics/ImageMagick even when the cpu
flags are not used.

Reported by:	Andreas Tobler
2012-06-13 20:21:08 +00:00
Pedro F. Giffuni
b28518a59a Add experimental support for amdfam10/barcelona from the GCC 4.3 branch.
Initial support for the AMD barcelona chipsets has been available in the
gcc43 branch under GPLv2 but was not included when the Core 2 support
was brought to the system gcc.

AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10
support and made them available. Unfortunately this is still experimental
and while it can improve performance, enabling the CPUTYPE may break some
C++ ports (like clang).

Special care was taken to make sure that the patches predate the GPLv3
switch upstream.

Tested by:	Vladimir Kushnir
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-06-12 15:04:18 +00:00
Pedro F. Giffuni
a90710e961 Fix a typo in GCC affecting calculations with -ffast-math.
The fix is similar to the one applied in GCC-4.3 in
GCCSVN-r117929 under the GPLv2.

Submitted by:	Andrey Simonenko
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC after:	3 days
2012-04-05 15:16:51 +00:00
Pedro F. Giffuni
4ee8547efb Clean an inconsistency with -ffinite-math-only.
Backported from the gcc-4_3-branch, revision 118001,
under the GPLv2.

This issue was also fixed in Apple's gcc.

PR:		157025
Reviewed by:	mm
Approved by:	jhb (mentor)
MFC:		2 weeks
2011-12-21 01:58:35 +00:00
Alexander Kabaev
9d6b9560a8 FreeBSD uses unchanged versions of this files. 2007-05-19 02:12:21 +00:00
Alexander Kabaev
f2d5255ddd Resolve conflicts after GCC 3.4.6 20060825 import. 2006-08-26 21:37:21 +00:00
Alexander Kabaev
31a119f3ed Stock files. 2005-06-03 03:50:42 +00:00
Alexander Kabaev
f246de45e2 Use stock GCC versions on these files. 2004-07-28 03:36:15 +00:00
Alexander Kabaev
3697be5590 No FreeBSD-local changes in these files. 2003-11-07 03:05:29 +00:00
Alexander Kabaev
b2bcf6753d FreeBSD uses stock versions of these GCC files. 2003-07-11 04:00:23 +00:00
Alexander Kabaev
d79e61dc75 Update HEAD with stock GCC 3.2.2 release files. 2003-02-10 05:57:03 +00:00
David E. O'Brien
21da7e2bd7 Use pure stock files. 2002-12-04 16:31:48 +00:00
Alexander Kabaev
6a10d74be1 Revert rev. 1.2. GCC 3.2 seems to have builtin_memset fixed.
Approved by:	obrien
2002-09-01 21:18:18 +00:00
David E. O'Brien
ec9ec8af6a Gcc 3.1 (-O) now generates broken inline code for memset in some cases.
This broke newfs (newfs left some garbage in a bitmap).

The ASM for:

	#include <string.h>
	int x, foo[100];
	main()
	{
		memset(&foo[0], 0, x);
	}

is (at least if you have fixed function alignment):

	.file	"z.c"
	.text
	.p2align 2,,3
.globl main
	.type	main,@function
main:
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%edi
	pushl	%eax
	movl	x, %ecx
	xorl	%eax, %eax
	shrl	$2, %ecx
	movl	$foo, %edi
	cld
	rep
	stosl
	andl	$-16, %esp
				<-- the lower bits of `len' should be loaded
				    near here
	testl	$2, %edi	<-- this seems to be meant to test the 2^1
				    bit in `len' (not alignment of the pointer
				    like it actually does).  %edi is the wrong
				    register for holding the bits, since it is
				    still needed for the pointer.
	je	.L2
	stosw
.L2:
	testl	$1, %edi	<-- similarly for the 2^0 bit.
	je	.L3
	stosb
.L3:
	movl	-4(%ebp), %edi
	leave
	ret
.Lfe1:
	.size	main,.Lfe1-main
	.comm	foo,400,32
	.comm	x,4,4
	.ident	"GCC: (GNU) 3.1 [FreeBSD] 20020509 (prerelease)"

This seems to only result in (len % 3) bytes not being cleared, since gcc
doesn't seem to use the builtin memset unless it knows that the pointer is
aligned.  If %edi could be misaligned, then too many bytes would be set.

Submitted by:	BDE
2002-06-04 18:04:27 +00:00
David E. O'Brien
909b401074 Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT. 2002-05-09 20:02:13 +00:00
David E. O'Brien
1952e2e1c1 Enlist the FreeBSD-CURRENT users as testers of what is to become Gcc 3.1.0.
These bits are taken from the FSF anoncvs repo on 1-Feb-2002 08:20 PST.
2002-02-01 18:16:02 +00:00