]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
internal/cpu: define kdsaQuery for s390
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 14:01:15 +0000 (14:01 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Oct 2019 14:01:15 +0000 (14:01 +0000)
    Patch from Andreas Krebbel.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201037

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276962 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/MERGE
libgo/go/internal/cpu/cpu_gccgo.c

index 1c90e55e9b198d57da99d2307bd1c11bb585d379..360c76b6026522f40a204ebe98e23fa18bd51cbf 100644 (file)
@@ -1,4 +1,4 @@
-f174fdad69cad42309984dfa108d80f2ae8a9f78
+ed1bd343130ab4907750156d3c04a0cef428bf68
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index ed0e7bff8cd48759ecdc22c898d6d6f636ba6f61..6b40f0137a4cb46c1464d9d46294ec73efb7328b 100644 (file)
@@ -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__)  */