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: Autoincrement addressing modes


>  > I thought I'd had a pseudo example of what I'd had in mind for handling
>  > both of these in a stroke: referencing it in an insn.
>  > 
>  >   (define_insn "*movsi_load"
>  >     [(set (match_operand:SI 0 "register_operand" "r")
>  > 	  (mem:SI (match_address:PI 1 "base,base_disp,auto_inc")))]
>  >     "ldl %0,%1")
>  > 
>  >   (define_insn "*movsi_store"
>  >     [(set (mem:SI (match_address:PI 1 "base,base_disp,auto_dec"))
>  > 	  (match_operand:SI 0 "register_operand" "r"))]
>  >     "stl %0,%1")
>  > 
> 
> I'm unsure about this since it would require wholesale changes to the
> machine description.  For example, how would you handle an add insn
> that could have memory or register operands in various combinations?

Seconded.  This even applies to some RISC pattern, e.g. sign/zero extension
can be a register-register operation or a memory-register operation.
The way gcc is designde we have to use a single pattern for this so that
reload can do The Right Thing (tm).


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