This is the mail archive of the gcc@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]

Re: Porting GCC: setting lenght-atrribute


Mueller-Lehnitz@t-online.de (Anja Müller) writes:


[...]

>   "*
>   { int len;
>     return gen_ashlqi3 (insn, operands, &len, which_alternative);"
>   }
>   [(set_attr "length" "?,?,?") <- dependet from variable len (set by the
> called function)
>    (set_attr "type" "logic,logic,logic")
>    (set_attr "cc" "*,*,*")]

[...]

> to set the length-attribute ? Is there a possibility to set an attribute
> in the Output Template ?

I'm use ADJUST_INSN_LENGTH in my port (Atmel avr).

#define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
					  adjust_insn_length (INSN, LENGTH))
/* If defined, modifies the length assigned to instruction INSN as a
   function of the context in which it is used.  LENGTH is an lvalue
   that contains the initially computed length of the insn and should
   be updated with the correct length of the insn.  If updating is
   required, INSN must not be a varying-length insn.

   This macro will normally not be required.  A case in which it is
   required is the ROMP.  On this machine, the size of an `addr_vec'
   insn must be increased by two to compensate for the fact that
   alignment may be required.  */


Denis.


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