This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to implement pre-dec, post-inc in a new backend?
- From: Ian Lance Taylor <iant at google dot com>
- To: Florent DEFAY <spira dot inhabitant at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 03 Jun 2009 06:28:51 -0700
- Subject: Re: how to implement pre-dec, post-inc in a new backend?
- References: <8502af3c0906030201j7af5677brbac0411d12dabc37@mail.gmail.com>
Florent DEFAY <spira.inhabitant@gmail.com> writes:
> I looked over AVR backend but I did not understand some things like:
> 'p' and 'r' are codes introduced to mean that operands should be
> pre-dec or post-inc
> ___________________________________________________________
> ;; p POST_INC or PRE_DEC address as a pointer (X, Y, Z)
> ;; r POST_INC or PRE_DEC address as a register (r26, r28, r30)
> ___________________________________________________________
> but they seem to be never used.
Those are % operands used with PRINT_OPERAND. They are used in avr.c.
Look at, e.g., out_movhi_r_mr.
return (AS2 (sbiw,%r1,2) CR_TAB
AS2 (ld,%A0,%p1) CR_TAB
AS2 (ldd,%B0,%p1+1));
Ian