This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] MIPS: For micromips allow near-far-3.c test to use the jals instruction to call near_func
- From: Andrew Bennett <Andrew dot Bennett at imgtec dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Matthew Fortune <Matthew dot Fortune at imgtec dot com>, "Moore, Catherine (Catherine_Moore at mentor dot com)" <Catherine_Moore at mentor dot com>
- Date: Mon, 6 Jul 2015 13:20:27 +0000
- Subject: [PATCH] MIPS: For micromips allow near-far-3.c test to use the jals instruction to call near_func
- Authentication-results: sourceware.org; auth=none
Hi,
The near-far-3.c test is failing for micromips because it is expecting the call
to near_func to be performed by a jal instruction, but for micromips this is done
by a jals instruction.
I have updated the expected test output to deal with this case. I have tested
this on the mips-mti-elf target using mips32r2/{-mno-micromips/-mmicromips}
test options and there are no new regressions.
The patch and ChangeLog are below.
Ok to commit?
Many thanks,
Andrew
testsuite/
* gcc.target/mips/near-far-3.c: Allow the call to near_func to use
the jals instruction.
diff --git a/gcc/testsuite/gcc.target/mips/near-far-3.c b/gcc/testsuite/gcc.target/mips/near-far-3.c
index d4d48b1..ea151bc 100644
--- a/gcc/testsuite/gcc.target/mips/near-far-3.c
+++ b/gcc/testsuite/gcc.target/mips/near-far-3.c
@@ -13,5 +13,5 @@ NOMIPS16 int test4 () { return normal_func (); }
/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
-/* { dg-final { scan-assembler "\tj(|al)\tnear_func\n" } } */
+/* { dg-final { scan-assembler "\tj(|al|als)\tnear_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tnormal_func\n" } } */