public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Converting addc to adcx
@ 2019-05-31 10:34 Jeffrey Walton
  2019-05-31 11:19 ` Segher Boessenkool
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Walton @ 2019-05-31 10:34 UTC (permalink / raw)
  To: gcc-help

Hi Everyone,

We have this inline asm on x86_64. Notice adcq and the constant $0:

    asm ("addq %2, %0; adcq $0, %1;" : "+r"(a0), "+r"(a1) : "r"(b) : "cc");

I convert it to adcx. This conversion tests OK.

    asm ("addq %2, %0; adcx %3, %1;" : "+r"(a0), "+r"(a1) : "r"(b),
"r"(0ULL) : "cc");

Is this a valid conversion?

The reason I ask is, I've got a larger one with 9 operands. When I
make the same change (swap constant for a positional with 0) and test
it, it fails. The only thing I can think of is, it is not a valid
conversion but the tools don't reject it.

Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-31 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 10:34 Converting addc to adcx Jeffrey Walton
2019-05-31 11:19 ` Segher Boessenkool
2019-05-31 11:30   ` Jeffrey Walton
2019-05-31 11:47     ` Segher Boessenkool
2019-05-31 14:26       ` Jeffrey Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).