]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Add required tls to read thread pointer test
authorPan Li <pan2.li@intel.com>
Thu, 27 Apr 2023 03:31:42 +0000 (11:31 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 27 Apr 2023 15:01:45 +0000 (23:01 +0800)
The read-thread-pointer test may require the gcc configured
with --enable-tls. If no, there x4 (aka tp) register will not
be presented in the assembly code.

This patch requires the tls for the dg checking. It will perform
the test checking if --enable-tls and mark the test as unsupported
if --disable-tls.

Configured with --enable-tls:
=== gcc Summary ===
of expected passes            16

Configured with --disable-tls:
=== gcc Summary ===
of unsupported tests          8

gcc/testsuite/ChangeLog:

* gcc.target/riscv/read-thread-pointer.c: Add required tls.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/testsuite/gcc.target/riscv/read-thread-pointer.c

index 401fb42112994b9a079d3b22792f4e560a62e666..5f460b5f746bb4d22cf717baac0adc9bc256225b 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target tls_native } */
 
 void *get_tp()
 {