From: Matthew Fortune <matthew.fort...@imgtec.com> Ensure micromips test does not get confused about library support. Ensure insn-casesi.c and insn-tablejump.c can be executed.
Move the micromips/mips16 selection into the file as per function attributes so that there is no requirement on having a full micromips or mips16 runtime to execute the test. gcc/testsuite/ * gcc.target/mips/insn-tablejump.c: Force o32 ABI as we do not really support n32/n64 microMIPS. Require micromips support but not the command line option. * gcc.target/mips/insn-casesi.c: Require mips16 support but not the command line option. Cherry-picked e7aaf244857638adeb9d1eb5207dbe2842cbe81d from https://github.com/MIPS/gcc Signed-off-by: Matthew Fortune <matthew.fort...@imgtec.com> Signed-off-by: Faraz Shahbazker <fshahbaz...@wavecomp.com> Signed-off-by: Aleksandar Rakic <aleksandar.ra...@htecgroup.com> --- gcc/testsuite/gcc.target/mips/insn-casesi.c | 6 +++--- gcc/testsuite/gcc.target/mips/insn-tablejump.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/gcc.target/mips/insn-casesi.c b/gcc/testsuite/gcc.target/mips/insn-casesi.c index 2b4c9f21986..03d13070460 100644 --- a/gcc/testsuite/gcc.target/mips/insn-casesi.c +++ b/gcc/testsuite/gcc.target/mips/insn-casesi.c @@ -1,7 +1,7 @@ /* { dg-do run } */ -/* { dg-options "-mips16 -mcode-readable=yes" } */ +/* { dg-options "(-mips16) -mabi=32 -mcode-readable=yes" } */ -int __attribute__ ((noinline)) +MIPS16 int __attribute__ ((noinline)) frob (int i) { switch (i) @@ -22,7 +22,7 @@ frob (int i) return i; } -int +MIPS16 int main (int argc, char **argv) { asm ("" : "+r" (argc)); diff --git a/gcc/testsuite/gcc.target/mips/insn-tablejump.c b/gcc/testsuite/gcc.target/mips/insn-tablejump.c index ecba154b9e0..271108a3ed6 100644 --- a/gcc/testsuite/gcc.target/mips/insn-tablejump.c +++ b/gcc/testsuite/gcc.target/mips/insn-tablejump.c @@ -1,7 +1,7 @@ /* { dg-do run } */ -/* { dg-options "-mmicromips" } */ +/* { dg-options "(-mmicromips) -mabi=32" } */ -int __attribute__ ((noinline)) +MICROMIPS int __attribute__ ((noinline)) frob (int i) { switch (i) @@ -22,7 +22,7 @@ frob (int i) return i; } -int +MICROMIPS int main (int argc, char **argv) { asm ("" : "+r" (argc)); -- 2.34.1