This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] mips: Allow larger values for __aligned__
- From: Carlos O'Donell <carlos at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Sandiford <richard at codesourcery dot com>, echristo at apple dot com
- Date: Wed, 20 Sep 2006 18:47:08 -0400
- Subject: [PATCH] mips: Allow larger values for __aligned__
On mips __attribute__((__aligned__(val))) for values of val greater than
32kb does not work. This patch changes the default value for
MAX_OFILE_ALIGNMENT. We set the value of MAX_OFILE_ALIGNMENT to the
largest page size allowed by the mips PageMask register.
This allows the mips linux kernel to be compiled with 64kb pages sizes.
Previously the compilation failed since the task structures could not be
aligned to greater than 32kb.
Tested without regressions on mips64el-none-linux-gnu and
mips-none-linux-gnu.
OK to commit for head?
Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716
2006-09-20 Carlos O'Donell <carlos@codesourcery.com>
* config/mips/mips.h (MAX_OFILE_ALIGNMENT): Define.
Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h (revision 117093)
+++ gcc/config/mips/mips.h (working copy)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. MIPS version.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by A. Lichnewsky (lich@inria.inria.fr).
Changed by Michael Meissner (meissner@osf.org).
64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
@@ -2710,3 +2710,8 @@ while (0)
#ifndef HAVE_AS_TLS
#define HAVE_AS_TLS 0
#endif
+
+/* The PageMask register allows a maximum page size of 256Mb.
+ The value of MAX_OFILE_ALIGNMENT is in bits, so multiple by 8. */
+#undef MAX_OFILE_ALIGNMENT
+#define MAX_OFILE_ALIGNMENT (0x10000000 << 3)