This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PowerPC cleanups
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 03 Aug 2002 19:27:54 -0400
- Subject: PowerPC cleanups
mov?i patterns should use nop on PowerPC when moving SPR to
itself. -mcpu=405 is soft-float. Print sizes as unsigned in storage
pseudo-ops and use alignment argument when present.
David
* config/rs6000/rs6000.md (movsi_internal1): Add nop mnemonic.
(movhi_internal): Same.
(movqi_internal): Same.
(movdi_internal64): Same.
* config/rs6000/t-ppccomm (MULTILIB_MATCHES_FLOAT): Add mcpu=405.
* config/rs6000/xcoff.h (SKIP_ASM_OP): Define.
(ASM_OUTPUT_SKIP): Use it. SIZE unsigned.
(COMMON_ASM_OP): Define.
(ASM_OUTPUT_ALIGNED_COMMON): Use it. SIZE unsigned.
Use ALIGN parameter.
(LOCAL_COMMON_ASM_OP): Define.
(ASM_OUTPUT_LOCAL): Use it. SIZE unsigned.
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.201
diff -c -p -r1.201 rs6000.md
*** rs6000.md 30 Jul 2002 16:36:02 -0000 1.201
--- rs6000.md 3 Aug 2002 23:14:05 -0000
***************
*** 8197,8203 ****
mt%0 %1
mt%0 %1
mt%0 %1
! cror 0,0,0"
[(set_attr "type" "*,*,load,store,*,*,*,*,*,*,mtjmpr,*,*")
(set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")])
--- 8197,8203 ----
mt%0 %1
mt%0 %1
mt%0 %1
! {cror 0,0,0|nop}"
[(set_attr "type" "*,*,load,store,*,*,*,*,*,*,mtjmpr,*,*")
(set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")])
***************
*** 8263,8269 ****
mf%1 %0
mt%0 %1
mt%0 %1
! cror 0,0,0"
[(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
(define_expand "movqi"
--- 8263,8269 ----
mf%1 %0
mt%0 %1
mt%0 %1
! {cror 0,0,0|nop}"
[(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
(define_expand "movqi"
***************
*** 8285,8291 ****
mf%1 %0
mt%0 %1
mt%0 %1
! cror 0,0,0"
[(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
;; Here is how to move condition codes around. When we store CC data in
--- 8285,8291 ----
mf%1 %0
mt%0 %1
mt%0 %1
! {cror 0,0,0|nop}"
[(set_attr "type" "*,load,store,*,*,*,mtjmpr,*")])
;; Here is how to move condition codes around. When we store CC data in
***************
*** 8967,8973 ****
stfd%U0%X0 %1,%0
mf%1 %0
mt%0 %1
! cror 0,0,0"
[(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,*,mtjmpr,*")
(set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4")])
--- 8967,8973 ----
stfd%U0%X0 %1,%0
mf%1 %0
mt%0 %1
! {cror 0,0,0|nop}"
[(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,*,mtjmpr,*")
(set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4")])
Index: t-ppccomm
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/t-ppccomm,v
retrieving revision 1.15
diff -c -p -r1.15 t-ppccomm
*** t-ppccomm 19 Feb 2002 19:40:41 -0000 1.15
--- t-ppccomm 3 Aug 2002 23:14:05 -0000
*************** tramp.S: $(srcdir)/config/rs6000/tramp.a
*** 27,32 ****
--- 27,33 ----
# Switch synonyms
MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \
msoft-float=mcpu?403 \
+ msoft-float=mcpu?405 \
msoft-float=mcpu?ec603e \
msoft-float=mcpu?801 \
msoft-float=mcpu?821 \
Index: xcoff.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/xcoff.h,v
retrieving revision 1.28
diff -c -p -r1.28 xcoff.h
*** xcoff.h 1 Jun 2002 02:01:11 -0000 1.28
--- xcoff.h 3 Aug 2002 23:14:05 -0000
*************** toc_section () \
*** 353,371 ****
/* This is how to advance the location counter by SIZE bytes. */
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
! fprintf (FILE, "\t.space %d\n", (SIZE))
/* This says how to output an assembler line
to define a global common symbol. */
! #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNMENT) \
! do { fputs ("\t.comm ", (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
! if ( (SIZE) > 4) \
! fprintf ((FILE), ",%d,3\n", (SIZE)); \
else \
! fprintf ((FILE), ",%d\n", (SIZE)); \
} while (0)
/* This says how to output an assembler line
--- 353,378 ----
/* This is how to advance the location counter by SIZE bytes. */
+ #define SKIP_ASM_OP "\t.space "
+
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
! fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE))
/* This says how to output an assembler line
to define a global common symbol. */
! #define COMMON_ASM_OP "\t.comm "
!
! #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
! do { fputs (COMMON_ASM_OP, (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
! if ((ALIGN) > 32) \
! fprintf ((FILE), ",%u,%u\n", (SIZE), \
! exact_log2 ((ALIGN) / BITS_PER_UNIT)); \
! else if ((SIZE) > 4) \
! fprintf ((FILE), ",%u,3\n", (SIZE)); \
else \
! fprintf ((FILE), ",%u\n", (SIZE)); \
} while (0)
/* This says how to output an assembler line
*************** toc_section () \
*** 374,383 ****
alignment after preceding TOC section if it was aligned
for 64-bit mode. */
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
! do { fputs ("\t.lcomm ", (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
! fprintf ((FILE), ",%d,%s\n", (TARGET_32BIT ? (SIZE) : (ROUNDED)), \
xcoff_bss_section_name); \
} while (0)
--- 381,392 ----
alignment after preceding TOC section if it was aligned
for 64-bit mode. */
+ #define LOCAL_COMMON_ASM_OP "\t.lcomm "
+
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
! do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
! fprintf ((FILE), ",%u,%s\n", (TARGET_32BIT ? (SIZE) : (ROUNDED)), \
xcoff_bss_section_name); \
} while (0)