This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Enabling tree->rtl to generate (plus for asm() operands at O0
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mrs at apple dot com (Mike Stump)
- Cc: gcc at gcc dot gnu dot org (GCC Development)
- Date: Mon, 30 Jan 2006 14:50:16 -0500 (EST)
- Subject: Re: Enabling tree->rtl to generate (plus for asm() operands at O0
> 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.
Which does:
static char var;
int main()
{
asm volatile ("" :: "i"(&var + 1));
return 0;
}
(which looks weird in the sense it is undefined code but still legal code).
Thanks,
Andrew Pinski