new mips type attributes: shift, slt, clz

Richard Sandiford rsandifo@redhat.com
Wed Mar 17 07:09:00 GMT 2004


Jim Wilson <wilson@specifixinc.com> writes:
> The const type seems to be used inconsistently.  Some places that load
> constants use the const type, some use the arith type.  I didn't try to
> decipher this.  I left these as arith which seems accurate, since they will
> expand to either an addiu, ori, or lui in the vast majority of cases.

For the record, schedulers are supposed to treat "const" and "arith"
in the same way.  I only added "const" for the benefit of the length
attribute:

(define_attr "length" ""
          [...]
	  (eq_attr "type" "const")
	  (symbol_ref "mips_const_insns (operands[1]) * 4")

This seemed preferable to using set_attr_alternative for those
many-alternative move patterns.

Richard



More information about the Gcc-patches mailing list