This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: fix to sparc.c:arith_4096_operand
Incidentally, the places this is used in sparc.md are not really
correct. While adding 4096 is best done with a subtract insn in
the assembly, the rtl should not be made non-canonical in this way.
Instead you should have a constraint letter, possibly like so:
(C) == 'O' ? SPARC_SIMM13_P (-(VALUE))
(define_insn "*addsi3"
[(set (match_operand:SI 0 "register_operand" "=r,r,d")
(plus:SI (match_operand:SI 1 "arith_operand" "%r,r,d")
(match_operand:SI 2 "arith_operand" "rI,O,d")))]
""
"@
add\\t%1, %2, %0
sub\\t%1, %N2, %0
fpadd32s\\t%1, %2, %0"
[(set_attr "type" "*,*,fp")])
where %N negates the operand.
r~