MSP430: Emulate 16-bit shifts with rotate insn when src operand is in memory
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Thu, 6 Jun 2019 09:23:10 +0000 (09:23 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Thu, 6 Jun 2019 09:23:10 +0000 (09:23 +0000)
commite445e4b4feb25facd3a61787c51c96eb3bda66f1
tree59ac87cf7b187839129cbec50601df38d59e507f
parentd1b2f85f78589a2bece2f874a6021ed746209697
MSP430: Emulate 16-bit shifts with rotate insn when src operand is in memory

gcc/ChangeLog

2019-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.md (ashlhi3): Force shift src operand into a
register if it is in memory, so the shift can be emulated with a rotate
instruction.
(ashrhi3): Likewise.
(lshrhi3): Likewise.

gcc/testsuite/ChangeLog

2019-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc.target/msp430/emulate-slli.c: New test.
* gcc.target/msp430/emulate-srai.c: New test.
* gcc.target/msp430/emulate-srli.c: New test.

From-SVN: r271993
gcc/ChangeLog
gcc/config/msp430/msp430.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/msp430/emulate-slli.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/emulate-srai.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/emulate-srli.c [new file with mode: 0644]