[PATCH][MIPS] Improve Octeon Pop instruction usage
Richard Sandiford
rdsandiford@googlemail.com
Sat Jul 21 07:40:00 GMT 2012
"Pinski, Andrew" <Andrew.Pinski@caviumnetworks.com> writes:
> +;; The POP instruction is special as it does not take into account the upper
> +;; 32bits and is documented that way.
> +(define_insn "*popcountdi2_trunc"
> + [(set (match_operand:SI 0 "register_operand" "=d")
> + (popcount:SI (truncate:SI (match_operand:DI 1 "register_operand" "d"))))]
> + "ISA_HAS_POP"
> + "pop\t%0,%1"
> + [(set_attr "type" "pop")
> + (set_attr "mode" "SI")])
Just crossing the "i"s really, but we'd better check TARGET_64BIT too.
I realise we wouldn't expect to see truncate otherwise, but the pattern
wouldn't be correct for 32-bit big-endian.
OK with that change, thanks.
Richard
More information about the Gcc-patches
mailing list