This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Useless clobber?
- To: Virgil dot Palanciuc at cs dot pub dot ro
- Subject: Re: Useless clobber?
- From: John Wehle <john at feith dot com>
- Date: Tue, 11 Apr 2000 16:01:15 -0400 (EDT)
- Cc: gcc at gcc dot gnu dot org
> (define_insn ""
> [(set (match_operand:SI 0 "register_operand" "=d")
> (mult:SI
> (zero_extend:SI
> (match_operand:HI 1 "register_operand" "d"))
> (zero_extend:SI
> (match_operand 2 "register_operand" "d"))))
> ( clobber (match_operand:SI 3 "register_operand" "d"))]
> ""
> "impyuu\\t%1,%2,%0")
> I cannot comunicate with the guys that wrote the machine description(I
> don't know how to contact them), but placing the clobber in this pattern
> seems stupid to me.
The clobber ensures that there's a spare register available when the
insn executes. The current i386 backend has a similar clobber in
fix_truncXXdi2 patterns because the FPU is implemented using a stack
and there isn't an instruction which converts from floating point to
DImode without popping the stack. The i386 backend works around this
by making a copy of the register (which requires a spare register)
before doing the conversion.
I don't know if the clobber is necessary for the pattern you're looking
at, however it may be.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------