Hi Andrew!

On 2024-08-08T13:50:17+0000, Andrew Stubbs <a...@baylibre.com> wrote:
> 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.

ACK; I see a lot of UNSUPPORTED -> PASS progressions (tested
'-march=gfx908', '-march=gfx1100').

Just two non-good ones:

    [-UNSUPPORTED:-]{+FAIL:+} gcc.dg/20050607-1.c {+(test for excess errors)+}

    [...]/gcc.dg/20050607-1.c: In function 'foo':
    [...]/gcc.dg/20050607-1.c:7:5: warning: padding struct size to alignment 
boundary with 4 bytes [-Wpadded]

..., which, as I understand the test case is what should *not* be
happening.

And the other:

    [-FAIL:-]{+PASS:+} gfortran.dg/optional_absent_8.f90   -O0  (test for 
excess errors)
    [-UNRESOLVED:-]{+FAIL:+} gfortran.dg/optional_absent_8.f90   -O0  
[-compilation failed to produce executable-]{+execution test+}
    PASS: gfortran.dg/optional_absent_8.f90   -O1  (test for excess errors)
    PASS: gfortran.dg/optional_absent_8.f90   -O1  execution test
    PASS: gfortran.dg/optional_absent_8.f90   -O2  (test for excess errors)

    STOP 11


Grüße
 Thomas


> 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