This is the mail archive of the gcc@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]

Excessive stack usage on m68k - BUG?



When comparing output of egcs-1.1.2 and gcc-2.95 for m68k, I noticed some
strange differences.

The target is m68k-amigaos, not currently in the baseline sources, but I
checked with m68k-linux, and the results were similar.

int main(void)
{
	char a[5];
	f(a);
}

On egcs-1.1.2, this generates:

#NO_APP
gcc2_compiled.:
___gnu_compiled_c:
.text
	.even
.globl _main
_main:
	link a5,#-8
	jbsr ___main
	pea a5@(-6)
	jbsr _f
	moveq #0,d0
	unlk a5
	rts

8-byte frame for 5-byte array. OK.

Now, with gcc-2.95:

#NO_APP
gcc2_compiled.:
___gnu_compiled_c:
.text
	.even
.globl _main
_main:
	link a5,#-16
	jbsr ___main
	pea a5@(-16)
	jbsr _f
	moveq #0,d0
	unlk a5
	rts

Why 16 bytes?

Is this a bug? I would like to hear your opinion before I dive into this.

I grepped through the ChangeLog and could not find anything suitable in
m68k-specific changes. STACK_BOUNDARY is still 16 (bits) in gcc-2.95, just
as it used to be.

Regards,

Kamil


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