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]

Blackfin patch: Clean up call patterns


This removes a bit of unused pic-related cruft from the call patterns and print_operand, and adjusts a few conditions to be slightly more accurate.

Applying on all 4.x trees.


Bernd
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 112006)
+++ ChangeLog	(working copy)
@@ -7,6 +7,13 @@
 	* config/bfin/crti.S: Use it instead of __PIC__.
 	* config/bfin/crtn.S: Likewise.
 
+	* config/bfin/bfin.md (call_value_symbol, sibcall_value_symbol,
+	call_symbol, sibcall_symbol): Disallow if TARGET_ID_SHARED_LIBRARY,
+	not if flag_pic.
+	Lose 'G' modifier for call operand.
+	* config/bfin/bfin.c (print_operand) <case SYMBOL_REF>: Don't
+	recognize 'G' modifier.
+
 2006-03-13  Eric Botcazou  <ebotcazou@adacore.com>
 
 	PR middle-end/18859
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 111336)
+++ config/bfin/bfin.c	(working copy)
@@ -1264,8 +1264,6 @@ print_operand (FILE *file, rtx x, char c
 
 	case SYMBOL_REF:
 	  output_addr_const (file, x);
-	  if (code == 'G' && flag_pic)
-	    fprintf (file, "@GOT");
 	  break;
 
 	case CONST_DOUBLE:
Index: config/bfin/bfin.md
===================================================================
--- config/bfin/bfin.md	(revision 111336)
+++ config/bfin/bfin.md	(working copy)
@@ -1362,10 +1362,10 @@ (define_insn "*call_symbol"
 	 (match_operand 1 "general_operand" "g"))
    (use (match_operand 2 "" ""))]
   "! SIBLING_CALL_P (insn)
-   && !flag_pic
+   && !TARGET_ID_SHARED_LIBRARY
    && GET_CODE (operands[0]) == SYMBOL_REF
    && !bfin_longcall_p (operands[0], INTVAL (operands[2]))"
-  "call %G0;"
+  "call %0;"
   [(set_attr "type" "call")
    (set_attr "length" "4")])
 
@@ -1375,10 +1375,10 @@ (define_insn "*sibcall_symbol"
    (use (match_operand 2 "" ""))
    (return)]
   "SIBLING_CALL_P (insn)
-   && !flag_pic
+   && !TARGET_ID_SHARED_LIBRARY
    && GET_CODE (operands[0]) == SYMBOL_REF
    && !bfin_longcall_p (operands[0], INTVAL (operands[2]))"
-  "jump.l %G0;"
+  "jump.l %0;"
   [(set_attr "type" "br")
    (set_attr "length" "4")])
 
@@ -1388,10 +1388,10 @@ (define_insn "*call_value_symbol"
 	      (match_operand 2 "general_operand" "g")))
    (use (match_operand 3 "" ""))]
   "! SIBLING_CALL_P (insn)
-   && !flag_pic
+   && !TARGET_ID_SHARED_LIBRARY
    && GET_CODE (operands[1]) == SYMBOL_REF
    && !bfin_longcall_p (operands[1], INTVAL (operands[3]))"
-  "call %G1;"
+  "call %1;"
   [(set_attr "type" "call")
    (set_attr "length" "4")])
 
@@ -1402,10 +1402,10 @@ (define_insn "*sibcall_value_symbol"
    (use (match_operand 3 "" ""))
    (return)]
   "SIBLING_CALL_P (insn)
-   && !flag_pic
+   && !TARGET_ID_SHARED_LIBRARY
    && GET_CODE (operands[1]) == SYMBOL_REF
    && !bfin_longcall_p (operands[1], INTVAL (operands[3]))"
-  "jump.l %G1;"
+  "jump.l %1;"
   [(set_attr "type" "br")
    (set_attr "length" "4")])
 

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