[Bug inline-asm/31386] wrong registers used in cmov instruction

2020-03-09 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31386

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Andrew Pinski  ---
Invalid as mentioned, you need the early clobbers, otherwise GCC thinks the
output and input registers can be the same.  In this case the output registers
which is held in operand 0 has to be different from operands 4 and 5.

[Bug inline-asm/31386] wrong registers used in cmov instruction

2007-04-02 Thread ramiro at lisha dot ufsc dot br


--- Comment #3 from ramiro at lisha dot ufsc dot br  2007-04-02 21:24 
---
Hello,

That and many other combinations fix the issue. Including changing the code
around the inline asm, or using different optimizations.

What seems wrong is that gcc uses the same register for 2 outputs. Maybe on
that specific register pressure it allocates the same register for 2 outputs.

Is gcc ever supposed to allow 2 output operands to use the same register?

Ramiro Polla


-- 


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



[Bug inline-asm/31386] wrong registers used in cmov instruction

2007-03-28 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2007-03-28 22:49 ---
Actually I think the inline-asm should be:
#define CMOV_COMBO( val1, val2 ) \
asm volatile ( \
"cmpl %0, %3\n\t" \
"cmovl %3, %0\n\t" \
"cmovl %4, %1\n\t" \
"cmovl %5, %2\n\t" \
: "+&r" (dmin), "+&r" (dx), "+&r" (dy) \
: "r" (d), "r" (val1), "r" (val2) \
 )


-- 


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



[Bug inline-asm/31386] wrong registers used in cmov instruction

2007-03-28 Thread ramiro at lisha dot ufsc dot br


--- Comment #1 from ramiro at lisha dot ufsc dot br  2007-03-28 22:39 
---
Created an attachment (id=13296)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13296&action=view)
.c, .i and .s files


-- 


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