This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: error in finding a register to spill
- From: Shinpei Kato <shinny at j02 dot itscom dot net>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 3 Aug 2004 15:36:52 +0900 (JST)
- Subject: Re: error in finding a register to spill
- References: <410D77A2.1090006@specifixinc.com>
Hi, thanks for a reply.
>You said you have only one status register. In that case, using a hard
>register is a much better choice than using a pseudo. If you use a
>pseudo, then the compiler assumes there are an infinite number of them,
>and then later when it tries to map them onto one hard register, you
>will likely get poor code because of all of the spills required. You
>can avoid this by using a hard register in the first place. See for
>instance the mips port. It uses a hard reg if there is only one status
>register, and a pseudo is there are 8 status registers.
Yes I thought it would be better to use a hard register instead of a pseudo.
But I didn't know how to do that...
First of all, I changed "sge_df" like,
*******************************************
(define_insn "sge_df"
[set (reg:CC 39)
(ge:CC (match_opernad:DF 0 "register_operand" "f")
(match_opernad:DF 1 "register_operand" "f")))]
"TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"c.le.d\t%1, %0"
[(set_attr "type" "fcmp")
(set_attr "mode" "FPSW")])
*******************************************
Is this nearly what you meant?
Here note that c.le.d takes 2 operands which are source & target and the result of comparison is stored into $f7 automatically by hardware.
After modifying as above, I compiled successfully though another error occured in the insn called "branch_fp"...
This error is also about finding a register to spill so I hope I could overcome it by the same way.
Regards,
Shinpei