middle-end/5345: ICE when using the "+m" constraint with built-in assembly

Andrew Zabolotny zap@cobra.ru
Mon Jan 14 01:31:00 GMT 2002


On 12 Jan 2002 19:16:26 -0000, rodrigc@gcc.gnu.org wrote:

>Synopsis: ICE when using the "+m" constraint with built-in assembly
>
>State-Changed-From-To: open->analyzed
>State-Changed-By: rodrigc
>State-Changed-When: Sat Jan 12 11:16:26 2002
>State-Changed-Why:
>    I can reproduce your error with gcc 3.0.3.
>    
>    With gcc 3.1 in CVS, I get a different error message:
>    gcc-ice.cpp: In function `float qsqrt(float)':
>    gcc-ice.cpp:18: output constraint 0 cannot be specified together with
>    "st"
>       clobber
>    gcc-ice.cpp:44: confused by earlier errors, bailing out
Hmm... it looks like the problem has been at least partially fixed. Can you 
please try to remove the "st" constraint, e.g. the last three lines of the asm 
directive will look like this:

		"fmulp	%%st(1)\n"		// a
	: "=&t" (ret), "+m" (x) : "m" (0.5F), "m" (1.5F)
	: "eax", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)"
  );

The "st" constraint which was specified before is indeed doubtful, but it worked 
with gcc <=2.95.3.

>    I am not enough of an asm expert to know what the correct
>    remedy is.
Is it reasonable for me to rise this question on gcc mailing list? Where else I 
can get an expert advice on built-in gcc assembly?

Greetings,
    _\ndy



More information about the Gcc-bugs mailing list