help splitting instruction with two memory operands

King, Steven R steven.r.king@intel.com
Thu Feb 4 19:53:00 GMT 2010


Hello List,

I'm new to gcc internals.  As part of an experiment, I copied the i386 back-end in gcc 4.2.2 to create my own i386-like target arch.  At some point, my hacking caused my i386 to produce assembly with two memory touching operands in one instruction, like this:

	movl	12(%ebp), -44(%ebp)
	movl	16(%ebp), -40(%ebp)
	movl	20(%ebp), -36(%ebp)

I compiled with -O0.

I need to fix this back to i386 style with only 1 memory reference allowed per instruction.  After a day looking, I'm unable to determine what I did wrong either in the i386.md or i386.c files to cause this.  My own i386 is quite hacked up, so just doing a diff with the original file was too noisy to give much clue.

Can anyone please offer a pointer as to where RTL with two memory references is split in the i386 back end?

Thanks you,
-steve



More information about the Gcc mailing list