aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2025-08-17 08:26:12 -0600
committerJeff Law <jlaw@ventanamicro.com>2025-08-17 08:26:12 -0600
commitc9c767468cb68eb22878d5be37e70fecaa24a051 (patch)
treedbd89fe62933d1e17623ec3b0c36f4d4414034fc
parent21251fe7ff5cee3b899ebc79a4c421c89f439d34 (diff)
downloadgcc-c9c767468cb68eb22878d5be37e70fecaa24a051.zip
gcc-c9c767468cb68eb22878d5be37e70fecaa24a051.tar.gz
gcc-c9c767468cb68eb22878d5be37e70fecaa24a051.tar.bz2
Testsuite: Fix insn-*.c tests from trunk
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-casesi.c: Require mips16 support but not the command line option. * 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.
-rw-r--r--gcc/testsuite/gcc.target/mips/insn-casesi.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/insn-tablejump.c6
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 2b4c9f2..03d1307 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 ecba154..271108a 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));