[PATCH 0/3] MSP430: Improve code-generation for shift instructions

Jozef Lawrynowicz jozef.l@mittosystems.com
Tue Jul 21 18:17:15 GMT 2020


The attached series of patches improve code-generation for MSP430 shift
instructions.
The first two patches are changes to generic areas of GCC, required for
the 3rd patch to have the desired effect.

Successfully regtested on trunk for x86_64-pc-linux-gnu (for the
generic changes) and msp430-elf.

Ok to apply?

Jozef Lawrynowicz (3):
  expr: Allow scalar_int_mode target mode when converting a constant
  expmed: Fix possible use of NULL_RTX return value from emit_store_flag
  MSP430: Simplify and extend shift instruction patterns

 gcc/config/msp430/constraints.md              |  10 +-
 gcc/config/msp430/msp430-protos.h             |   6 +-
 gcc/config/msp430/msp430.c                    | 272 +++++++++----
 gcc/config/msp430/msp430.md                   | 381 +++++-------------
 gcc/config/msp430/msp430.opt                  |   6 +
 gcc/config/msp430/predicates.md               |  13 +-
 gcc/doc/invoke.texi                           |  15 +-
 gcc/expmed.c                                  |  34 +-
 gcc/expr.c                                    |   2 +-
 .../gcc.target/msp430/emulate-srli.c          |   2 +-
 .../msp430/max-inline-shift-430-no-opt.c      |  52 +++
 .../gcc.target/msp430/max-inline-shift-430.c  |  50 +++
 .../gcc.target/msp430/max-inline-shift-430x.c |  48 +++
 libgcc/config/msp430/slli.S                   |  15 +
 libgcc/config/msp430/srai.S                   |  15 +
 libgcc/config/msp430/srli.S                   |  16 +
 16 files changed, 548 insertions(+), 389 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/msp430/max-inline-shift-430-no-opt.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/max-inline-shift-430.c
 create mode 100644 gcc/testsuite/gcc.target/msp430/max-inline-shift-430x.c

--
2.27.0


More information about the Gcc-patches mailing list