This patch enables generation of LDRD/STRD for configurations in which
LDM/STM would be preferable (e.g., Cortex-A15 with -Os or Cortex-A9 with
-O2), but cannot be generated. There are several situations in which LDM/STM
cannot be generated, but LDRD/STRD can be generated, for example memory
addressing with large offset or order of registers. This patch handles both
ARM and Thumb modes.

The files ldrdstrd0.md and ldrdstrd1.md are automatically generated from
ldrdstrd.md.in by simple substitution. The generated files are included from
arm.md, before and after ldmstm.md. The patterns in both files are the same.
The only difference is a flag in the pattern conditions. 

This duplication is far from ideal, but I don't know how to avoid it,
because the order in which the patterns are listed is essential.

Note that this patch does not include the file ldrdstrd0.md, which has
already been introduced by patch no. 1 in this sequence (to make the review
of the patterns easier). 

gcc/ChangeLog

2011-10-28  Greta Yorsh  <greta.yo...@arm.com>

          * config/arm/t-arm: Update the build system to generate 
            ldrdstrd0.md  and ldrdstrd1.md from ldrdstrd.md.in.
        * config/arm/arm.md: Include "ldrdstrd1.md" after "ldmstm.md".
          * config/arm/ldrdstrd.md.in: New file, template.
          * config/arm/ldrdstrd1.md: New file, automatically generated 
            from ldrdstrd.md.
          
contrib/ChangeLog

2011-11-02  Greta Yorsh  <greta.yo...@arm.com>

        * gcc_update (files_and_dependencies): Add ldrdstrd.md dependencies.

Attachment: 3-size.patch
Description: Binary data

Reply via email to