This is the mail archive of the gcc-patches@gcc.gnu.org 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] Alternative number in output_asm_name


On Wed, May 21, 2008 at 2:06 AM, Ye, Joey <joey.ye@intel.com> wrote:
> It is well known which_alternative is from 0 to N-1. Where as in .s file
> generated with option -dp, alternative number is from 1 to N. This is
> very confusing.
>
> For example, i386.md has
> (define_insn "*movsf_1"
> ...
> switch (which_alternative)
> ...
> case 7: case 8:
>      return "movss\t{%1, %0|%0, %1}";
>
> But the output .s is:
> movss   %xmm0, (%rax)   # 10    *movsf_1/9      [length = 4]
>                                                               ^^^
> Confusing
>
> I'd suggest to follow C convention to output 0 to N-1 in .s file. OK to
> mainline?
>
> Thanks - Joey
>
> 2008-05-21 Joey Ye <joey.ye@intel.com>
>
>        * final.c (output_asm_name): Don't plus one to
> which_alternative.
>

It also bothers me when I am comparing the alternative indicated
in the assembly code with alternatives in md files. I think it is a
good idea to make 2 consistent. Are they any objections to this
simple and useful change?

Thanks.


H.J.


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