microMIPS/GCC: Fix PIC call relaxation

Programming / Compilers / GCC - macro [138bc75d-0d04-0410-961f-82ee72b054a4] - 16 November 2016 15:05 UTC

gcc/
- config/mips/mips.c (mips_output_jump): Output R_MICROMIPS_JALR rather than R_MIPS_JALR relocation in microMIPS code. Do not cancel short delay slots in PIC call relaxation.

gcc/testsuite/
- gcc.target/mips/call-1.c (dg-options): Add `-mno-micromips'. (dg-final): Remove microMIPS JALRS mnemonic matching.
- gcc.target/mips/call-2.c (dg-options): Add `-mno-micromips'. (dg-final): Remove microMIPS JALRS mnemonic matching.
- gcc.target/mips/call-3.c (dg-options): Add `-mno-micromips'. (dg-final): Remove microMIPS JALRS mnemonic matching.
- gcc.target/mips/call-4.c (dg-options): Add `-mno-micromips'.
- gcc.target/mips/call-5.c (dg-options): Add `-mno-micromips'.
- gcc.target/mips/call-6.c (dg-options): Add `-mno-micromips'.
- gcc.target/mips/call-1u.c: New test case.
- gcc.target/mips/call-2u.c: New test case.
- gcc.target/mips/call-3u.c: New test case.
- gcc.target/mips/call-4u.c: New test case.
- gcc.target/mips/call-5u.c: New test case.
- gcc.target/mips/call-6u.c: New test case.

88526ee microMIPS/GCC: Fix PIC call relaxation
gcc/ChangeLog | 6 ++++
gcc/config/mips/mips.c | 9 ++----
gcc/testsuite/ChangeLog | 18 +++++++++++
gcc/testsuite/gcc.target/mips/call-1.c | 8 ++---
gcc/testsuite/gcc.target/mips/call-1u.c | 51 +++++++++++++++++++++++++++++
gcc/testsuite/gcc.target/mips/call-2.c | 4 +--
gcc/testsuite/gcc.target/mips/call-2u.c | 13 ++++++++
gcc/testsuite/gcc.target/mips/call-3.c | 4 +--
gcc/testsuite/gcc.target/mips/call-3u.c | 12 +++++++
gcc/testsuite/gcc.target/mips/call-4.c | 2 +-
gcc/testsuite/gcc.target/mips/call-4u.c | 12 +++++++
gcc/testsuite/gcc.target/mips/call-5.c | 2 +-
gcc/testsuite/gcc.target/mips/call-5u.c | 53 +++++++++++++++++++++++++++++++
gcc/testsuite/gcc.target/mips/call-6.c | 2 +-
gcc/testsuite/gcc.target/mips/call-6u.c | 52 ++++++++++++++++++++++++++++++
15 files changed, 231 insertions(+), 17 deletions(-)

Upstream: gcc.gnu.org


  • Share