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]
Other format: [Raw text]

Re: new auto-inc-dec pass


On Mon, Mar 05, 2007 at 03:44:20AM +0100, Roman Zippel wrote:
 
> The dataflow porting document mentions other possible, but doesn't mention 
> any examples. Anything I might have to look out for regardings the m68k 
> post_inc/pre_dec addressing modes?

   I have not checked what GCC currently generates for

void mystrcpy (char *dest, char *src)
{
	while ((*dest++ = *src++))
		;
}

but the loop should compile to (a1 = dest, a0 = src)

Loop:
	move.b	(a0)+,	(a1)+
	bne.s	Loop

at least for -Os or -mtune=68010.

-- 
Rask Ingemann Lambertsen


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