https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63359

andysem at mail dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andysem at mail dot ru

--- Comment #14 from andysem at mail dot ru ---
I've been hit by this issue recently.

(In reply to Richard Earnshaw from comment #12)
> We considered that, but it won't work.  For example, in ILP32 address
> registers need to use the X form, but are still 32-bits in size.  There are
> other cases as well where a W or X form is required but that is not the
> natural size of the object.

For the cases where the size needs to be specified explicitly, you can leave
%w1/%x1 syntax. But the default register size, I think, should be chosen based
on the asm argument size.

There is one case where I don't feel like %w1/%x1 syntax is correct, even if
currently accepted. It's when the argument allows an alternative of an
immediate constant:

asm("add %w0, %w1, %w2" : "=r"(r) : "r"(i), "Ir"(j));

Note the last argument. When it is a constant, it doesn't need the "w" prefix,
but it needs one if it is a runtime value.

Reply via email to