Simple function.c patch

Jeffrey A Law law@cygnus.com
Tue Dec 14 01:11:00 GMT 1999


  In message <19991105132312.09192@atrey.karlin.mff.cuni.cz>you write:
  > Hi
  > This patch adds stack_alignment_needed field to the function structure.
  > It constains largest alignment of stack slot allocated, so machine
  > descirptions can use it to align frame pointer as necesarry.
  > 
  > Patch to use it for i386 follows.
  > 
  > Honza
  > 
  > Fri Nov  5 11:15:53 CET 1999  Jan Hubicka  <hubicka@freesoft.cz>
  > 	* function.c (PREFERRED_STACK_BOUDNARY): Provide default value.
  > 	(assign_stack_local_1): Limit alignment to PREFERRED_STACK_BOUNDARY,
  > 	update stack_alignment_needed.
  > 	(prepare_function_start): Initialize stack_alignment_needed
  > 	* function.h (struct function): Add field stack_alignment_needed.
Note that we write:

#if !defined (BLAH) && defined (COM)

You're missing the parens in the default definition of 
PREFERRED_STACK_BOUNDARY.

"gurantee" -> "guarantee"

Also note that PREFERRED_STACK_BOUNDARY does not guarantee the that alignment;
it merely tells the compiler to do its best to provide that alignment.  So I
think you should update your comment in assign_stack_local_1 accordingly.

Fix those two issues and you can install this patch.

Thanks,
jeff



More information about the Gcc-patches mailing list