Previously, trampolines worked on GCN3 devices, but the newer GCN5
devices had different permissions on the stack memory space we were
using.

That changed when we added the reverse-offload features because we
switched from using the "private" memory space to using a regular memory
allocation.

The execute permissions on this new space permit trampolines to work
just as they did before.

This patch has been committed to mainline and will be pushed to the OG14
branch shortly.

Andrew

gcc/ChangeLog:

        * config/gcn/gcn.cc (gcn_trampoline_init): Re-enable trampolines.
---
 gcc/config/gcn/gcn.cc | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 00f2978559b..b22132de6ab 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -3799,11 +3799,6 @@ gcn_asm_trampoline_template (FILE *f)
 static void
 gcn_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
 {
-  // FIXME
-  if (TARGET_GCN5_PLUS)
-    sorry ("nested function trampolines not supported on GCN5 due to"
-           " non-executable stacks");
-
   emit_block_move (m_tramp, assemble_trampoline_template (),
                   GEN_INT (TRAMPOLINE_SIZE), BLOCK_OP_NORMAL);
 
-- 
2.45.2

Reply via email to