Commit d2317d50 by Ian Lance Taylor

internal/cpu: define kdsaQuery for s390

    
    Patch from Andreas Krebbel.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201037

From-SVN: r276962
parent ea978210
f174fdad69cad42309984dfa108d80f2ae8a9f78 ed1bd343130ab4907750156d3c04a0cef428bf68
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -184,4 +184,19 @@ struct queryResult klmdQuery() { ...@@ -184,4 +184,19 @@ struct queryResult klmdQuery() {
return ret; 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__) */ #endif /* defined(__s390x__) */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment