aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-11-26 12:34:29 +0000
committerNick Clifton <nickc@gcc.gnu.org>2007-11-26 12:34:29 +0000
commitf6284d979e752b69dfdce8f07318f08489d3a6c4 (patch)
treef3c1d6c5a2d9fffd4b82166bc118280bddec1b08
parent5e043dc905a76adbb55b1ca7a769a644d4091cc1 (diff)
downloadgcc-f6284d979e752b69dfdce8f07318f08489d3a6c4.zip
gcc-f6284d979e752b69dfdce8f07318f08489d3a6c4.tar.gz
gcc-f6284d979e752b69dfdce8f07318f08489d3a6c4.tar.bz2
mn10300.md: (call_internal): Remove mode on operand 0 in order to match UNPSEC'ed calls...
* config/mn10300/mn10300.md: (call_internal): Remove mode on operand 0 in order to match UNPSEC'ed calls generated in PIC mode. (call_value_internal): Remove mode on operands 0 and 1 in order to match UNPSEC'ed calls generated in PIC mode. (GOTaddr2picreg): Use copy_rtx to prevent sharing an rtx between two insns. From-SVN: r130437
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/mn10300/mn10300.md14
2 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76daadc..474e34c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-26 Nick Clifton <nickc@redhat.com>
+
+ * config/mn10300/mn10300.md: (call_internal): Remove mode on
+ operand 0 in order to match UNPSEC'ed calls generated in PIC mode.
+ (call_value_internal): Remove mode on operands 0 and 1 in order to
+ match UNPSEC'ed calls generated in PIC mode.
+ (GOTaddr2picreg): Use copy_rtx to prevent sharing an rtx between
+ two insns.
+
2007-11-26 Richard Guenther <rguenther@suse.de>
PR middle-end/34233
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 6d68674..c9540b8 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -1819,8 +1819,10 @@
DONE;
}")
+;; NB: Mode on match_operand 0 deliberately omitted in
+;; order to be able to match UNSPECs in PIC mode.
(define_insn "call_internal"
- [(call (mem:QI (match_operand:SI 0 "call_address_operand" "aS"))
+ [(call (mem:QI (match_operand 0 "call_address_operand" "aS"))
(match_operand:SI 1 "general_operand" "g"))]
""
"*
@@ -1864,10 +1866,12 @@
DONE;
}")
+;; NB: Mode on match_operands 0 and 1 deliberately omitted
+;; in order to be able to match UNSPECs in PIC mode.
(define_insn "call_value_internal"
- [(set (match_operand 0 "" "=dax")
- (call (mem:QI (match_operand:SI 1 "call_address_operand" "aS"))
- (match_operand:SI 2 "general_operand" "g")))]
+ [(set (match_operand 0 "register_operand" "=dax")
+ (call (mem:QI (match_operand 1 "call_address_operand" "aS"))
+ (match_operand:SI 2 "general_operand" "g")))]
""
"*
{
@@ -2560,7 +2564,7 @@
emit_insn (gen_am33_loadPC (operands[0]));
else
emit_insn (gen_mn10300_loadPC (operands[0]));
- emit_insn (gen_add_GOT_to_pic_reg (operands[0]));
+ emit_insn (gen_add_GOT_to_pic_reg (copy_rtx (operands[0])));
DONE;
}
")