This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Autoincrement addressing modes
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Autoincrement addressing modes
- From: "Michael P. Hayes" <michaelh at ongaonga dot chch dot cri dot nz>
- Date: Tue, 17 Mar 1998 00:02:39 GMT
- Cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, michaelh at ongaonga dot chch dot cri dot nz, egcs at cygnus dot com
- References: <19980212023505.17080@dot.cygnus.com><199803162251.WAA08886@phal.cygnus.co.uk><19980316154706.61400@dot.cygnus.com>
Richard Henderson writes:
> On Mon, Mar 16, 1998 at 10:51:27PM +0000, Joern Rennecke wrote:
> 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?
> (While we're at changes, recognize PI as an alias for SI or DI as
> appropriate to the current pointer size.)
I agree that Pmode should be used for addresses in the machine
description.