how to implement pre-dec, post-inc in a new backend?

Florent DEFAY spira.inhabitant@gmail.com
Wed Jun 3 09:01:00 GMT 2009


Hi,

I am working on a new port to a target which supports pre-dec and
post-inc addressing modes.

I was told that the auto-increment/decrement optimizations aren't all
that good in GCC. But AVR has it working. I would like to know
everything about implementing pre-dec/post-inc in a machine
description.

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.

Please help.

Regards.

Florent



More information about the Gcc-help mailing list