gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}
authorTobias Burnus <tobias@codesourcery.com>
Tue, 22 Nov 2022 16:54:34 +0000 (17:54 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 22 Nov 2022 16:57:35 +0000 (17:57 +0100)
commitd6bbca7b78745915d98bb1324d79de6a1e6dc801
tree8cd4b4359517e7b6df2e5f2c56da7a11a29a9cc5
parentac5054144bd2248e948842937448eb5f4ce36bfd
gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}

The new builtins have been added for newlib to reduce dependency on
compiler-internal implementation choices of GCC in newlibs' getreent.c.

gcc/ChangeLog:

* config/gcn/gcn-builtins.def (FIRST_CALL_THIS_THREAD_P,
GET_STACK_LIMIT): Add new builtins.
* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand them.
* config/gcn/gcn.md (prologue_use): Add "register_operand" as
arg to match_operand.
(prologue_use_di): New; DI insn_and_split variant of the former.

Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
gcc/config/gcn/gcn-builtins.def
gcc/config/gcn/gcn.cc
gcc/config/gcn/gcn.md