This is the mail archive of the gcc@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]

Re: [ARM] Cirrus EP93xx Maverick Crunch Support - "bge" pattern



  if (get_attr_cirrus (prev_active_insn(insn)) == CIRRUS_COMPARE)
      return \"beq\\t%l0\;bvs\\t%l0\"; else return \"bge\\t%l0\;nop\";
  "
  [(set_attr "conds" "jump_clob")
   (set_attr "length" "8")]
)

As you can see, I need to replace all bge with a maverick crunch
equivalent.  However, "bge" is still also used with integer comparisons,
e.g:

I think you should generate the compare using a different mode for the CC register (like cc:CCMAV) and then use two patterns:


; Special pattern to match GE for MAVERICK.  Most restrictive
; pattern goes first.
(define_insn "*arm_cirrus_bge"
  [(set (pc)
	(if_then_else (ge (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
		      (label_ref (match_operand 0 "" ""))
		      (pc)))]
  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
  "beq\\t%l0\;bvs\\t%l0\"
  [(set_attr "conds" "jump_clob")
   (set_attr "length" "8")]
)

; Special pattern to match GE for ARM.
(define_insn "*arm_bge"
  [(set (pc)
	(if_then_else (ge (match_operand 1 "cc_register" "") (const_int 0))
		      (label_ref (match_operand 0 "" ""))
		      (pc)))]
  "TARGET_ARM && TARGET_HARD_FLOAT"
  "bge\\t%l0\"
  [(set_attr "conds" "jump_clob")
   (set_attr "length" "4")]
)


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