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

Paolo Bonzini bonzini@gnu.org
Wed Jun 27 08:45:00 GMT 2007


>   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")]
)



More information about the Gcc mailing list