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]

Fix Sparc call insn length


This bug was causing GCC to understate the length of certain call insns
by one word.  It had their length as one word, but then added one if they
were not part of a delay slot sequence.  But some were *three* words, so they
need to be made two words log.  This caused a call/jump peephole to generate
code that produced assembler errors when compiled.

The test case was ada/make.adb.

Wed Dec 26 17:55:50 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/sparc/sparc.md (call struct patterns): Show starting
	at two words long.

*** config/sparc/sparc.md	2001/12/19 23:00:39	1.140
--- config/sparc/sparc.md	2001/12/26 22:59:31
***************
*** 8402,8406 ****
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2"
!   [(set_attr "type" "call_no_delay_slot")])
  
  ;; This is a call that wants a structure value.
--- 8402,8407 ----
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2"
!   [(set_attr "type" "call_no_delay_slot")
!    (set_attr "length" "2")])
  
  ;; This is a call that wants a structure value.
***************
*** 8414,8418 ****
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2"
!   [(set_attr "type" "call_no_delay_slot")])
  
  ;; This is a call that may want a structure value.  This is used for
--- 8415,8420 ----
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tunimp\\t%2"
!   [(set_attr "type" "call_no_delay_slot")
!    (set_attr "length" "2")])
  
  ;; This is a call that may want a structure value.  This is used for
***************
*** 8426,8430 ****
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tnop"
!   [(set_attr "type" "call_no_delay_slot")])
  
  ;; This is a call that wants a structure value.
--- 8428,8433 ----
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tnop"
!   [(set_attr "type" "call_no_delay_slot")
!    (set_attr "length" "2")])
  
  ;; This is a call that wants a structure value.
***************
*** 8437,8441 ****
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tnop"
!   [(set_attr "type" "call_no_delay_slot")])
  
  (define_expand "call_value"
--- 8440,8445 ----
    "! TARGET_ARCH64 && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0"
    "call\\t%a0, %1\\n\\tnop\\n\\tnop"
!   [(set_attr "type" "call_no_delay_slot")
!    (set_attr "length" "2")])
  
  (define_expand "call_value"


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