[52/61] Fix register spill issue for soft-float glibc 2.29

Message ID 20250131171232.1018281-54-aleksandar.rakic@htecgroup.com
State New
Headers
Series Improve Mips target |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Aleksandar Rakic Jan. 31, 2025, 5:13 p.m. UTC
  From: "dragan.mladjenovic" <dragan.mladjenovic@rt-rk.com>

Adding the float-agnostic reproducer as test-case.

gcc/testsuite/

              * gcc.target/mips/tls-1.c: New file.

Cherry-picked fa3b6a1347154973324d264e6ad2dbd66d3f0028
from https://github.com/MIPS/gcc

Signed-off-by: Dragan Mladjenovic <dragan.mladjenovic@rt-rk.com>
Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com>
Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
---
 gcc/testsuite/gcc.target/mips/tls-1.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/mips/tls-1.c
  

Patch

diff --git a/gcc/testsuite/gcc.target/mips/tls-1.c b/gcc/testsuite/gcc.target/mips/tls-1.c
new file mode 100644
index 00000000000..38f6a5e1176
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/tls-1.c
@@ -0,0 +1,10 @@ 
+/* { dg-options "-mgp32" } */
+
+extern __thread int x __attribute__ ((tls_model ("initial-exec")));
+
+long long
+foo (long long y)
+{
+  x = 0;
+  return y;
+}