This is the mail archive of the gcc-bugs@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]

Re: rs6000.c cr names


On Sat, May 06, 2000 at 12:04:37AM -0400, David Edelsohn wrote:
> 	The AIX assembler does not know the symbolic names of condition
> registers, so the latest change for emitting branches fails with the
> native AIX tools.  The following patch removes the decorative "cr"
> prepended to condition register names.  If you want to emit pretty names
> for some platforms, you need to use rs6000_reg_names[][] table to
> translate the string appropriate for the platform assembler.
> 
> David
> 
> Index: rs6000.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
> retrieving revision 1.119
> diff -c -p -r1.119 rs6000.c
> *** rs6000.c	2000/05/04 22:15:23	1.119
> --- rs6000.c	2000/05/06 03:58:58
> *************** output_cbranch (op, label, reversed, ins
> *** 4073,4079 ****
>     else
>       s += sprintf (s, "b%s%s ", ccode, pred);
>   
> !   s += sprintf (s, "cr%d", cc_regno);
>   
>     if (label != NULL)
>       {
> --- 4073,4079 ----
>     else
>       s += sprintf (s, "b%s%s ", ccode, pred);
>   
> !   s += sprintf (s, "%d", cc_regno);
>   
>     if (label != NULL)
>       {

Yes, my vote would be to always use reg_names, and not to print numeric
as above.  Otherwise it breaks -mregnames on the System V/Linux/eabi front.
You don't need to use rs6000_reg_names, the normal reg_names points into there.

-- 
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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