This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix x86-64 code alignment
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org
- Date: Wed, 27 Feb 2002 10:32:08 +0100
- Subject: Fix x86-64 code alignment
Hi,
This attached patch makes us to use p2align on x86-64 compiler.
THis definition should probably be commonized to gas.h, but at the
moment I don't have time to do so and I want to install it to 3.0 branch,
where such cleanup is inacceptable, I guess.
Honza
Wed Feb 27 10:27:58 CET 2002 Jan Hubicka <jh@suse.cz>
* liinx64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define.
Index: linux64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/linux64.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 linux64.h
*** linux64.h 2001/12/06 10:43:01 1.3
--- linux64.h 2002/02/27 09:26:59
*************** Boston, MA 02111-1307, USA. */
*** 30,35 ****
--- 30,50 ----
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} %{!m32:-D__LONG_MAX__=9223372036854775807L}"
+ /* A C statement to output to the stdio stream FILE an assembler
+ command to advance the location counter to a multiple of 1<<LOG
+ bytes if it is within MAX_SKIP bytes.
+
+ This is used to align code labels according to Intel recommendations. */
+
+ #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
+ do { \
+ if ((LOG) != 0) { \
+ if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
+ else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
+ } \
+ } while (0)
+ #endif
+
/* Provide a LINK_SPEC. Here we provide support for the special GCC
options -static and -shared, which allow us to link things in one
of these three modes by applying the appropriate combinations of