------- Comment #38 from xyzzy at speakeasy dot org  2007-02-27 19:36 -------
(In reply to comment #37)
> now if there is a unwritten rule that "m" operands and variations of them
> cannot be copied anywhere, then it would be very desireable to have a asm
> constraint like "m" without this restriction this would resolve this and
> several other bugs
> also it would be very nice if such a dont copy restriction on "m" if it does
> exist could be documented

Copying "m" operands onto the stack might not be such a great thing to wish
for.  Imagine if you used asm("movaps %xmm0, %0": "=m"(x[i]));  If x[i] is only
32-bits, and gcc copied it onto the stack, then writing 16 bytes with movaps
wouldn't also write to x[i+1] to x[i+3] as intended.  I know there is a plenty
of asm code in ffmpeg that overwrites or overreads memory operands and will
fail if gcc tried to move them onto the stack.  There is also alignment. 
movaps requires an aligned address, and maybe you have chosen x and i in such a
way that it will be aligned.  But when gcc copies the value onto the stack, how
is it supposed to know what alignment it needs?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203

Reply via email to