2009/9/14 Richard Henderson <r...@redhat.com>: > 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. >
I have implemented the above solution and it works. I have to support the same for DF also. But with DF i have a problem with the constraints. My target generates code for both big and little endian. The ABI specifies that when a 64bit value is passed as an argument they are passed in R6 and R7, R6 containing the most significant long word and R7 containing the least significant long word, regardless of the endianess mode. How can i do this in the DF compare pattern? Regards, Shafi