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: Enabling tree->rtl to generate (plus for asm() operands at O0


On Jan 30, 2006, at 11:50 AM, Andrew Pinski wrote:
I'm trying to get:

void foo() {
   int rowfraclo[2];
   rowfraclo[1] = 42;
   asm ("movd mm6, %a0" : : "p" (rowfraclo+1));
}

With the below patch (still running the testsuite) I can get the
compiler to generate that code.  So, the question is how better can I
do this?

I don't know how better you can do but this actually fixes PR 23200.

I found an answer to my question. The solution is to use ARRAY_REF to form the PLUS_EXPR as it survives untouched longer. I use wrap with INDIRECT_REF and use "m" for the constraint and at -O0, I get the code I want, and no additional registers are burned. :-)



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