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]

patch ppc-e500: DW_OP_piece endian and minor fix


First. DW_OP_piece should be memory ordered, so we should output the halves correctly wrt endianness.

Second. I've changed checking for TARGET_SPE to use the processor type when dealing with MASK_STRING. I think a more generic solution is in order if more non-string operation chips come about (TARGET_HAS_STRING??), but for now this will do.

Applied to mainline.

2003-03-13 Aldy Hernandez <aldyh at redhat dot com>

	* config/rs6000/rs6000.c (rs6000_dwarf_register_span):
	Differentiate endianness.
	(s6000_override_options): Use cpu type instead of TARGET_SPE.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.437
diff -c -p -r1.437 rs6000.c
*** config/rs6000/rs6000.c	11 Mar 2003 21:26:12 -0000	1.437
--- config/rs6000/rs6000.c	13 Mar 2003 14:54:20 -0000
*************** rs6000_override_options (default_cpu)
*** 700,706 ****

    /* The e500 does not have string instructions, and we set
       MASK_STRING above when optimizing for size.  */
!   if (TARGET_SPE && (target_flags & MASK_STRING) != 0)
      target_flags = target_flags & ~MASK_STRING;

    /* Handle -m(no-)longcall option.  This is a bit of a cheap hack,
--- 700,706 ----

/* The e500 does not have string instructions, and we set
MASK_STRING above when optimizing for size. */
! if (rs6000_cpu == PROCESSOR_PPC8540 && (target_flags & MASK_STRING) != 0)
target_flags = target_flags & ~MASK_STRING;


    /* Handle -m(no-)longcall option.  This is a bit of a cheap hack,
*************** rs6000_dwarf_register_span (reg)
*** 13755,13766 ****
       64-bits.  */
    return
      gen_rtx_PARALLEL (VOIDmode,
! 		      gen_rtvec (2,
! 				 gen_rtx_REG (SImode, regno),
! 				 /* Who, where, what?  1200?  This
! 				    will get changed to a sane value
! 				    when the SPE ABI finalizes.  */
! 				 gen_rtx_REG (SImode, regno + 1200)));
  }

  #include "gt-rs6000.h"
--- 13755,13767 ----
       64-bits.  */
    return
      gen_rtx_PARALLEL (VOIDmode,
! 		      BYTES_BIG_ENDIAN
! 		      ? gen_rtvec (2,
! 				   gen_rtx_REG (SImode, regno + 1200),
! 				   gen_rtx_REG (SImode, regno))
! 		      : gen_rtvec (2,
! 				   gen_rtx_REG (SImode, regno),
! 				   gen_rtx_REG (SImode, regno + 1200)));
  }

#include "gt-rs6000.h"


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