aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2001-12-26 18:02:17 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2001-12-26 13:02:17 -0500
commitb92b324de7f13dd6504c1da292bf1ff677359664 (patch)
tree7d77c2756ec909b4c688bd37ea98eac7622af089
parent682bb080931180f79b553d3d57308c9a6e925633 (diff)
downloadgcc-b92b324de7f13dd6504c1da292bf1ff677359664.zip
gcc-b92b324de7f13dd6504c1da292bf1ff677359664.tar.gz
gcc-b92b324de7f13dd6504c1da292bf1ff677359664.tar.bz2
rs6000.md (indirect_jump): Prefer CTR over LR.
* rs6000.md (indirect_jump): Prefer CTR over LR. * xcoff.h (ASM_DECLARE_FUNCTION_NAME): Handle weak function. From-SVN: r48315
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.md12
-rw-r--r--gcc/config/rs6000/xcoff.h15
3 files changed, 25 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30d3831..0a7b113 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-26 David Edelsohn <edelsohn@gnu.org>
+
+ * rs6000.md (indirect_jump): Prefer CTR over LR.
+ * xcoff.h (ASM_DECLARE_FUNCTION_NAME): Handle weak function.
+
Tue Dec 25 12:04:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* dwarf2out.c: Reformatting and minor code rearrangement.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index be1a141..bf41db8 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -13030,15 +13030,19 @@
}")
(define_insn "indirect_jumpsi"
- [(set (pc) (match_operand:SI 0 "register_operand" "cl"))]
+ [(set (pc) (match_operand:SI 0 "register_operand" "c,*l"))]
"TARGET_32BIT"
- "b%T0"
+ "@
+ bctr
+ {br|blr}"
[(set_attr "type" "jmpreg")])
(define_insn "indirect_jumpdi"
- [(set (pc) (match_operand:DI 0 "register_operand" "cl"))]
+ [(set (pc) (match_operand:DI 0 "register_operand" "c,*l"))]
"TARGET_64BIT"
- "b%T0"
+ "@
+ bctr
+ blr"
[(set_attr "type" "jmpreg")])
;; Table jump for switch statements:
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index 095a566..e60f3fe 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -345,9 +345,18 @@ toc_section () \
SYMBOL_REF_FLAG (sym_ref) = 1; \
if (TREE_PUBLIC (DECL)) \
{ \
- fputs ("\t.globl .", FILE); \
- RS6000_OUTPUT_BASENAME (FILE, NAME); \
- putc ('\n', FILE); \
+ if (RS6000_WEAK && DECL_WEAK (decl)) \
+ { \
+ fputs ("\t.weak .", FILE); \
+ RS6000_OUTPUT_BASENAME (FILE, NAME); \
+ putc ('\n', FILE); \
+ } \
+ else \
+ { \
+ fputs ("\t.globl .", FILE); \
+ RS6000_OUTPUT_BASENAME (FILE, NAME); \
+ putc ('\n', FILE); \
+ } \
} \
else \
{ \