From d08c0ea31303046ce5e7da8ba8a2ff112589bc86 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Wed, 16 Nov 2016 21:35:02 +0000 Subject: [PATCH] MIPS16/GCC: Fix DImode `casesi_internal_mips16_' assembly instructions gcc/ * config/mips/mips.md (casesi_internal_mips16_): Add missing instruction prefixes throughout. Correct formatting. gcc/testsuite/ * gcc.target/mips/code-readable-4.c (dg-final): Expect `dla' rather than `la'. From-SVN: r242514 --- gcc/ChangeLog | 6 ++++++ gcc/config/mips/mips.md | 12 ++++++------ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/mips/code-readable-4.c | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4e437f0bb670..30161a022ea5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-16 Maciej W. Rozycki + + * config/mips/mips.md (casesi_internal_mips16_): Add + missing instruction prefixes throughout. Correct + formatting. + 2016-11-16 Maciej W. Rozycki * config/mips/mips.c (mips_output_jump): Output R_MICROMIPS_JALR diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index dc071d5e7b2c..0ccee9ead45a 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -6424,14 +6424,14 @@ { case HImode: output_asm_insn ("sll\t%5, %0, 1", operands); - output_asm_insn ("la\t%4, %2", operands); + output_asm_insn ("la\t%4, %2", operands); output_asm_insn ("addu\t%5, %4, %5", operands); output_asm_insn ("lh\t%5, 0(%5)", operands); break; - + case SImode: output_asm_insn ("sll\t%5, %0, 2", operands); - output_asm_insn ("la\t%4, %2", operands); + output_asm_insn ("la\t%4, %2", operands); output_asm_insn ("addu\t%5, %4, %5", operands); output_asm_insn ("lw\t%5, 0(%5)", operands); break; @@ -6439,9 +6439,9 @@ default: gcc_unreachable (); } - - output_asm_insn ("addu\t%4, %4, %5", operands); - + + output_asm_insn ("addu\t%4, %4, %5", operands); + return "j\t%4"; } [(set_attr "insn_count" "16")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0677079fb2b8..3707e7c29d2b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-11-16 Maciej W. Rozycki + + * gcc.target/mips/code-readable-4.c (dg-final): Expect `dla' + rather than `la'. + 2016-11-16 Maciej W. Rozycki * gcc.target/mips/call-1.c (dg-options): Add `-mno-micromips'. diff --git a/gcc/testsuite/gcc.target/mips/code-readable-4.c b/gcc/testsuite/gcc.target/mips/code-readable-4.c index beb9248de757..1a6fdf429be5 100644 --- a/gcc/testsuite/gcc.target/mips/code-readable-4.c +++ b/gcc/testsuite/gcc.target/mips/code-readable-4.c @@ -41,7 +41,7 @@ bar (void) return k; } -/* { dg-final { scan-assembler "\tla\t" } } */ +/* { dg-final { scan-assembler "\tdla\t" } } */ /* { dg-final { scan-assembler "\t\\.half\t" } } */ /* { dg-final { scan-assembler-not "%hi\\(\[^)\]*L" } } */ /* { dg-final { scan-assembler-not "%lo\\(\[^)\]*L" } } */ -- 2.43.5