MSP430: Implement 64-bit shifts in assembly code

Programming / Compilers / GCC - jozefl [138bc75d-0d04-0410-961f-82ee72b054a4] - 16 June 2019 21:24 EDT

gcc/ChangeLog:

2019-06-16 Jozef Lawrynowicz

- config/msp430/msp430.c (msp430_expand_helper): Setup arguments which describe how to perform MSPABI compliant 64-bit shift.
- config/msp430/msp430.md (ashldi3): New define_expand. (ashrdi3): New define_expand. (lshrdi3): New define_expand.

libgcc/ChangeLog:

2019-06-16 Jozef Lawrynowicz

- config/msp430/slli.S (__mspabi_sllll): New library function for performing a logical left shift of a 64-bit value.
- config/msp430/srai.S (__mspabi_srall): New library function for performing a arithmetic right shift of a 64-bit value.
- config/msp430/srll.S (__mspabi_srlll): New library function for performing a logical right shift of a 64-bit value.

gcc/testsuite/ChangeLog:

2019-06-16 Jozef Lawrynowicz

- gcc.target/msp430/mspabi_sllll.c: New test.
- gcc.target/msp430/mspabi_srall.c: New test.
- gcc.target/msp430/mspabi_srlll.c: New test.
- gcc.c-torture/execute/shiftdi-2.c: New test.

4ccf69d71a7 MSP430: Implement 64-bit shifts in assembly code
gcc/ChangeLog | 8 ++++++
gcc/config/msp430/msp430.c | 13 +++++++--
gcc/config/msp430/msp430.md | 36 +++++++++++++++++++++++++
gcc/testsuite/ChangeLog | 7 +++++
gcc/testsuite/gcc.c-torture/execute/shiftdi-2.c | 24 +++++++++++++++++
gcc/testsuite/gcc.target/msp430/mspabi_sllll.c | 10 +++++++
gcc/testsuite/gcc.target/msp430/mspabi_srall.c | 10 +++++++
gcc/testsuite/gcc.target/msp430/mspabi_srlll.c | 10 +++++++
libgcc/ChangeLog | 9 +++++++
libgcc/config/msp430/slli.S | 33 +++++++++++++++++++++++
libgcc/config/msp430/srai.S | 34 +++++++++++++++++++++++
libgcc/config/msp430/srli.S | 35 ++++++++++++++++++++++++
12 files changed, 227 insertions(+), 2 deletions(-)

Upstream: gcc.gnu.org


  • Share