This is the mail archive of the gcc-patches@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]

[PATCH] Fix PR c/19472, casts in memory input operand


Even though we should not accept this inline (maybe someone
should deprecated this), we accept a non changing mode
cast in the operand of memory input.  We do reject
a changing mode cast already for 4.0.0 and warn about
them in 3.3.1 and above.  This patch adds a fixme about this
situation (and if someone wants it deprecated, well there
is a place to do it now) and stips all of the casts which
don't change the mode.

OK? Bootstrapped and tested on ppc-darwin with no
regressions.

Thanks,
Andrew Pinski


ChangeLog: * c-typeck.c (build_asm_expr): Strip nops off input memory operands.

cp/ChangeLog:
	* cp/semantics.c (finish_asm_stmt): Strip nops off
	input memory operands.

Attachment: temp.diff.txt
Description: Text document



Testcase:
void blockCopy_MMX2(int*);
void postProcess_MMX2()
{
  int c, x,y, width;
  asm( "" :: "m" ((long)x));
  blockCopy_MMX2(&c);
}

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