This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA (middle-end documentation): Require LOCAL_ALIGNMENT et al to be unsigned


When looking how to fix 44767, I realized that LOCAL_ALIGNMENT is
generally used in an unsigned text.  The one bootstrapping target
which uses a function, i386, also uses a function with unsigned
alignment parameter and return types.

While it would be easy to use casts in the place where the macros
are used, that would be prone to unexpected loss of precision etc,
and defining preferences for the types gets us closer to
hookizing these macros.
2010-11-10  Joern Rennecke  <amylaar@spamcop.net>

	PR bootstrap/44756
	PR build/44767
	* doc/tm.texi.in (LOCAL_ALIGNMENT): State that the type, if any,
	should be unsigned.
	(STACK_SLOT_ALIGNMENT, LOCAL_DECL_ALIGNMENT, PUSH_ROUNDING): Likewise.
	* doc/tm.texi: Regenerate.

Index: doc/tm.texi
===================================================================
--- doc/tm.texi	(revision 166491)
+++ doc/tm.texi	(working copy)
@@ -1134,6 +1134,8 @@ @defmac LOCAL_ALIGNMENT (@var{type}, @va
 
 One use of this macro is to increase alignment of medium-size data to
 make it all fit in fewer cache lines.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
@@ -1149,6 +1151,8 @@ @defmac STACK_SLOT_ALIGNMENT (@var{type}
 
 This macro is to set alignment of stack slot to the maximum alignment
 of all possible modes which the slot may have.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac LOCAL_DECL_ALIGNMENT (@var{decl})
@@ -1161,6 +1165,8 @@ @defmac LOCAL_DECL_ALIGNMENT (@var{decl}
 
 One use of this macro is to increase alignment of medium-size data to
 make it all fit in fewer cache lines.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac MINIMUM_ALIGNMENT (@var{exp}, @var{mode}, @var{align})
@@ -3871,6 +3877,8 @@ @defmac PUSH_ROUNDING (@var{npushed})
 @smallexample
 #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)
 @end smallexample
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @findex current_function_outgoing_args_size
Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in	(revision 166491)
+++ doc/tm.texi.in	(working copy)
@@ -1124,6 +1124,8 @@ @defmac LOCAL_ALIGNMENT (@var{type}, @va
 
 One use of this macro is to increase alignment of medium-size data to
 make it all fit in fewer cache lines.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac STACK_SLOT_ALIGNMENT (@var{type}, @var{mode}, @var{basic-align})
@@ -1139,6 +1141,8 @@ @defmac STACK_SLOT_ALIGNMENT (@var{type}
 
 This macro is to set alignment of stack slot to the maximum alignment
 of all possible modes which the slot may have.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac LOCAL_DECL_ALIGNMENT (@var{decl})
@@ -1151,6 +1155,8 @@ @defmac LOCAL_DECL_ALIGNMENT (@var{decl}
 
 One use of this macro is to increase alignment of medium-size data to
 make it all fit in fewer cache lines.
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @defmac MINIMUM_ALIGNMENT (@var{exp}, @var{mode}, @var{align})
@@ -3861,6 +3867,8 @@ @defmac PUSH_ROUNDING (@var{npushed})
 @smallexample
 #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)
 @end smallexample
+
+It the value of this macro has a type, it should be an unsigned type.
 @end defmac
 
 @findex current_function_outgoing_args_size

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]