[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Re: GCC



Hi Johan!

> void myfunc(void)

You doesn't like ANSI-C?

Here are the generated assembler from the latest gcc. I used the 
following optimizations:

/* -Wall -ansi
 * -O3
 * -m68020-60
 * -fomit-frame-pointer
 * -fno-defer-pop
 * -fexpensive-optimizations
 * -fstrength-reduce
 */


Tschuess
   ...Frank

--
ATARI FALCON 040
--------------------------------------
Internet: fnaumann@cs.uni-magdeburg.de
Mausnet:  Frank Naumann @ L2                 
#NO_APP
gcc2_compiled.:
___gnu_compiled_c:
.text
	.even
.globl _main
_main:
	lea sp@(-2504),sp
	moveml #0x3c00,sp@-
	jbsr ___main
	movel #624,d2
	lea sp@(5012),a0
	.even
L5:
	clrl a0@(-2500)
	subql #4,a0
	dbra d2,L5
	clrw d2
	subql #1,d2
	jcc L5
	movel #625,d4
	clrl d2
	lea sp@(16),a1
	movel d2,d3
	movel d2,a0
	.even
L10:
	clrl d1
	movel a0,d0
	.even
L14:
	addl d3,a1@(d0:l)
	addql #4,d0
	addql #1,d1
	moveq #24,d5
	cmpl d1,d5
	jge L14
	addl d4,d3
	lea a0@(100),a0
	addql #1,d2
	cmpl d2,d5
	jge L10
	clrl d0
	moveml sp@+,#0x3c
	lea sp@(2504),sp
	rts
#NO_APP
gcc2_compiled.:
___gnu_compiled_c:
.text
	.even
.globl _main
_main:
	lea sp@(-2504),sp
	moveml #0x3c00,sp@-
	jbsr ___main
	movel #624,d2
	lea sp@(2512),a0
	.even
L5:
	clrl a0@
	subql #4,a0
	dbra d2,L5
	clrw d2
	subql #1,d2
	jcc L5
	clrl d2
	moveq #16,d4
	addl sp,d4
	lea 0:w,a1
	clrl d3
	.even
L10:
	clrl d1
	movel d4,a0
	addl d3,a0
	.even
L14:
	movel a0@,d0
	addl a1,d0
	movel d0,a0@+
	addql #1,d1
	moveq #24,d5
	cmpl d1,d5
	jge L14
	lea a1@(625),a1
	moveq #100,d5
	addl d5,d3
	addql #1,d2
	moveq #24,d5
	cmpl d2,d5
	jge L10
	clrl d0
	moveml sp@+,#0x3c
	lea sp@(2504),sp
	rts