Bug 26083

Summary: Reducing code over-alignment on Alpha
Product: Base System Reporter: peter.jeremy <peter.jeremy>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description peter.jeremy 2001-03-25 23:00:02 UTC
	Recently, following a commit to src/release/scripts/doFS.sh,
	a comment was made that the Alpha install disk is almost
	overflowing.  In the i386 case, the install disk can be squeezed
	by reducing the code over-alignment generated by gcc.  This
	feature isn't available on gcc/Alpha where the code alignment
	is hard-coded.

	Attached are some patches to implement -malign-jumps=N,
	-malign-loops=N and -malign-functions=N as for the i386.
	Implementing all this functionality is overkill for the
	release disk situation, but is consistent with the i386 and
	mostly consistent with the SPARC (alignments are specified
	in bytes on the SPARC, but log[base2](bytes) on the i386
	and in the patches below).

	I have successfully build and run a kernel with options
	"-malign-jumps=2 -malign-loops=2 -malign-functions=2" and
	completed a buildworld with options
	"-malign-jumps=3 -malign-loops=3 -malign-functions=4".

Fix: The following patches are against the following pre-release
	versions, rather than the just-committed 2.95.3 release.
How-To-Repeat: 
	Build a kernel with the standard gcc and with gcc containing
	the patches below.  Use "cmp -l" to show that they are the same
	other than the build-time and version number.

	I found that the kernel text segment shrank by 10% when compiled
	with "-malign-jumps=2 -malign-loops=2 -malign-functions=2".
Comment 1 David E. O'Brien freebsd_committer freebsd_triage 2001-04-05 22:57:14 UTC
State Changed
From-To: open->closed

I am not commiting localized patches of this degree to the src/contrib/gcc 
compiler.  These changes need to come into FreeBSD thru the normal [offical] 
GCC sources.