This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Please help!!!
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Алексей Хилаев <hardest2005 at mail dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 6 May 2019 10:30:14 -0500
- Subject: Re: Please help!!!
- References: <1557147718.189664150@f513.i.mail.ru>
On Mon, May 06, 2019 at 04:01:58PM +0300, Алек�1557147755�й Хилаев via gcc wrote:
> Gcc riscv won`t emit my insns, binutils and spike(riscv sim) work correctly, but gcc don`t. I want to add min/max for integer, gcc compiling correct, sim executing correctly.
>
> (define_insn "*min_<X:mode><GPR:mode>"
> [(set (match_operand:GPR 0 "register_operand" "=r")
> (smin:GPR (match_operand:X 1 "register_operand" " r")
> (match_operand:X 2 "register_operand" " r")))]
> ""
> "min\t%0,%1,%2"
> [(set_attr "type" "move")
> (set_attr "mode" "<X:MODE>")])
You need to call the patterns "minsi3" and the like, if you want it to be
automatically generated. Possibly combine can also make these patterns
for you; look at its dump file (-fdump-rtl-combine-all) to see what it
tried.
Segher