On Mon, Oct 14, 2019 at 2:09 AM Andreas Krebbel <kreb...@linux.ibm.com> wrote:
>
> Since the update to Go 1.13beta1 the kdsaQuery function is expected to
> be present. However, it is not with GCCGO since the assembler file
> from GOLANG cannot be understood by gas.  This patch adds an inline
> assembly implementation to cpu_gccgo.c.

Thanks.

Committed to trunk.

Ian



> 2019-10-14  Andreas Krebbel  <kreb...@linux.ibm.com>
>
>         * libgo/go/internal/cpu/cpu_gccgo.c:
> ---
>  libgo/go/internal/cpu/cpu_gccgo.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/libgo/go/internal/cpu/cpu_gccgo.c 
> b/libgo/go/internal/cpu/cpu_gccgo.c
> index ed0e7bff8cd..76b99cb00a0 100644
> --- a/libgo/go/internal/cpu/cpu_gccgo.c
> +++ b/libgo/go/internal/cpu/cpu_gccgo.c
> @@ -184,4 +184,19 @@ struct queryResult klmdQuery() {
>      return ret;
>  }
>
> +struct queryResult kdsaQuery(void)
> +  __asm__(GOSYM_PREFIX "internal..z2fcpu.kdsaQuery")
> +  __attribute__((no_split_stack));
> +
> +struct queryResult kdsaQuery() {
> +    struct queryResult ret;
> +
> +    __asm__ ("lghi   %%r0, 0\t\n"  // set function code to 0 (KDSA-Query)
> +            "la     %%r1, %[ret]\t\n"
> +            ".long  0xb93a0024\t\n"  // kdsa
> +            :[ret] "=QRST" (ret) : : "r0", "r1", "cc");
> +
> +    return ret;
> +}
> +
>  #endif /* defined(__s390x__)  */
> --
> 2.23.0
>

Reply via email to