This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [ARM] Cirrus EP93xx Maverick Crunch Support - "bge" pattern
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Hasjim Williams <gcc at futaris dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 27 Jun 2007 08:17:47 +0200
- Subject: Re: [ARM] Cirrus EP93xx Maverick Crunch Support - "bge" pattern
- References: <1182907601.15414.1197235601@webmail.messagingengine.com>
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")]
)