Supporting FP cmp lib routines

Richard Henderson rth@redhat.com
Mon Sep 14 16:03:00 GMT 2009


Another thing to look at, since you have hand-written routines and may 
be able to specify that e.g. only a subset of the normal call clobbered 
registers are actually modified, is to leave the call as a "compare" 
insn.  Something like

(define_insn "*cmpsf"
   [(set (reg:CC status-reg)
         (compare:CC
           (match_operand:SF 0 "register_operand" "R0")
           (match_operand:SF 1 "register_operand" "R1")))
    (clobber (reg:SI r2))
    (clobber (reg:SI r3))]
   ""
   "call __compareSF"
   [(set_attr "type" "call")])

Where the R0 and R1 constraints resolve to the input registers for the 
routine.  Depending on your ISA and ABI, you may not even need to split 
this pattern post-reload.


r~



More information about the Gcc mailing list