🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52952

must_preallocate in calls.c: expand_call

#52952
From: dong
Date: Fri, 24 Apr 1992 07:19
30 lines
1295 bytes
Dear supporters,

I have defined PUSH_ROUNDING in tm.h,  but gcc still generates
	sub sp, 1, sp
	move sp, r1
	move arg, [r1]
instead of 
	move arg, [--sp]	! this is a pre_dec

this happens if and only if there is only one argument. (e.g.  foo(1)).

According to my debuging,  this is because the following code in
calls.c: expand_call

line 1002:      if (copy_to_evaluate_size >= args_size.constant / 2)
line 1003:	must_preallocate = 1;

in my case,  if ( 0 >= 1 / 2 ) holds.

Is it correct to change this to 
      if (copy_to_evaluate_size &&
	  (copy_to_evaluate_size >= args_size.constant / 2))
or 
      if (copy_to_evaluate_size > args_size.constant / 2))
?

Thanks for your patient help.

Dong
Technical Details
Message-ID: <9204242119.AA10186@vlsi.cs.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!vlsi.cs.caltech.edu!dong

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,dcad18d1513ad325,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-04-24 00:19:14 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!vlsi.cs.caltech.edu!dong
From: dong@vlsi.cs.caltech.edu
Subject: must_preallocate in calls.c: expand_call
Message-ID: <9204242119.AA10186@vlsi.cs.caltech.edu>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 24 Apr 1992 07:19:14 GMT
Lines: 30