This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new mips type attributes: shift, slt, clz


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]