This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/39911: The 'z' suffix doesn't work with 16bit integer insn

On Mon, Apr 27, 2009 at 9:35 AM, Paolo Bonzini <> wrote:
>> 1. It is still the part of gcc source. It isn't the user documentation.
>> Given some out-of-date comments and actual usages in gcc source,
>> I will take actual usages over some out-of-date comments.
>> 2. %z is fully implemented and used for x87 insns.
> I don't think most users would look at the actual %z implementation.
> Those that look at the usages, likely did not know the story about
> fildll and guessed that using %z for x87 insns only is a quirk of GCC's
> machine description.
>> 3. "movq" isn't mentioned.
>> 4. "movw/movq" never worked on memory operand.
>> What do breaking %z on x87 insns and fixing %z on integer
>> insns in gcc 4.5 give to gcc users?
> Since no one is apparently using it %z on x87 insns, the advantage is

I have no idea how to come to this conclusion. You didn't see any
usages and no one has reported any issues don't mean it isn't used.

> that some users will have a fixed bug rather than one closed as invalid.
> Their 32-bit code which worked under GCC < 4.4, in addition, will work

That is wrong again. Try

  int foo;
  asm volatile ("mov%z0 %1, %0" : "=r"(foo) : "ir"(23));
  asm volatile ("add%z0 %1, %0": "+r" (foo): "ir" (23));

and tell me what you get.

> without any modification under GCC 4.5 too (and for both 32-bit and 64-bit).

My proposal provides 100% backward compatibility. The one you
advocated does nothing for gcc 4.4/older and doesn't provide
100% backward compatibility.

>>>> I don't think you are telling me that it is OK to change those modifiers
>>>> used by asm statement, except for ia64 `%Pn'.
>>> I do think that operand modifiers are a feature that, right now, can be
>>> considered "almost" internal to gcc.
>> What do you tell to those gcc users who have been using %z
>> on x87 insns since as back as gcc
> Are there any?

You can count me. I wrote one in my last patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]