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]

Re: [PATCH][calls.c] PR rtl-optimization/67226: Take into account pretend_args_size when checking stack offsets for sibcall optimisation


On 11/25/2015 01:41 PM, Bernd Schmidt wrote:
/* arg.locate doesn't contain the pretend_args_size offset, it's part of
    argblock.  Ensure we don't count it in I.  */
#ifdef STACK_GROWS_DOWNWARD
   i -= crtl->args.pretend_args_size
#else etc.

Hmm, yours looks equivalent, just addressing the problem from the other direction, except for the STACK_GROWS_DOWNWARD thing. If you fix that, either approach is OK, but watch formatting here (needs extra parens):

+	      int argblock_offset = arg->locate.offset.constant
+				     + crtl->args.pretend_args_size;

and a bit later it looks like there's a linebreak you could eliminate because things now fit into 80 characters.


Bernd


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