Patch: mips.md pattern for -mips16 -mlong-calls

Stan Cox scox@cygnus.com
Wed Sep 22 09:27:00 GMT 1999


New pattern which avoids assembler errors because of incorrect registers
being used with a jal instruction.

This has been approved and bootstrapped on irix.

	* mips.md (call_internal3c): New pattern for -mips16 -mlong-calls.

  
Index: config/mips/mips.md
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/mips/mips.md,v
retrieving revision 1.163
diff -c -2 -p -r1.163 mips.md
*** config/mips/mips.md	1999/09/07 04:13:48	1.163
--- config/mips/mips.md	1999/09/07 11:56:07
*************** move\\t%0,%z4\\n\\
*** 10450,10454 ****
  	 (match_operand 1 "" "i"))
     (clobber (match_operand:SI 2 "register_operand" "=d"))]
!   "!(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
    "%*jal\\t%2,%0"
    [(set_attr "type"	"call")
--- 10450,10455 ----
  	 (match_operand 1 "" "i"))
     (clobber (match_operand:SI 2 "register_operand" "=d"))]
!   "!TARGET_MIPS16
!    && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS"
    "%*jal\\t%2,%0"
    [(set_attr "type"	"call")
*************** move\\t%0,%z4\\n\\
*** 10460,10464 ****
  	 (match_operand 1 "" "i"))
     (clobber (match_operand:SI 2 "register_operand" "=d"))]
!   "Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
    "%*jal\\t%2,%0"
    [(set_attr "type"	"call")
--- 10461,10477 ----
  	 (match_operand 1 "" "i"))
     (clobber (match_operand:SI 2 "register_operand" "=d"))]
!   "!TARGET_MIPS16
!    && Pmode == DImode && !TARGET_ABICALLS && TARGET_LONG_CALLS"
!   "%*jal\\t%2,%0"
!   [(set_attr "type"	"call")
!    (set_attr "mode"	"none")
!    (set_attr "length"	"1")])
! 
! (define_insn "call_internal3c"
!   [(call (mem:SI (match_operand:SI 0 "register_operand" "e"))
! 	 (match_operand 1 "" "i"))
!    (clobber (match_operand:SI 2 "register_operand" "=y"))]
!   "TARGET_MIPS16 && !(Pmode == DImode) && !TARGET_ABICALLS && TARGET_LONG_CALLS
!    && GET_CODE (operands[2]) == REG && REGNO (operands[2]) == 31"
    "%*jal\\t%2,%0"
    [(set_attr "type"	"call")


More information about the Gcc-patches mailing list