This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS: For micromips allow near-far-3.c test to use the jals instruction to call near_func


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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]