From c6b7f68bfd61fcd02842e672476f9924d5ba1d3c Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 11 Dec 2021 19:01:15 -0500 Subject: libgccjit: Add support for TLS variable [PR95415] 2021-12-11 Antoni Boucher gcc/jit/ PR target/95415 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI tag. * docs/topics/expressions.rst: Add document for the function gcc_jit_lvalue_set_tls_model. * jit-playback.h: New function (set_tls_model). * jit-recording.c: New function (set_tls_model), new variables (tls_models and tls_model_enum_strings) and support for setting the tls model. * jit-recording.h: New function (set_tls_model) and new field m_tls_model. * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model). * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model) and new enum (gcc_jit_tls_model). * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag. gcc/testsuite/ PR target/95415 * jit.dg/all-non-failing-tests.h: Add test-tls.c. * jit.dg/test-tls.c: New test. --- gcc/jit/jit-playback.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/jit/jit-playback.h') diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h index f670c9e..c9839c2 100644 --- a/gcc/jit/jit-playback.h +++ b/gcc/jit/jit-playback.h @@ -675,6 +675,12 @@ public: rvalue * get_address (location *loc); + void + set_tls_model (enum tls_model tls_model) + { + set_decl_tls_model (as_tree (), tls_model); + } + private: bool mark_addressable (location *loc); }; -- cgit v1.1