提交 5fe29839 编写于 作者: H Heiko Carstens 提交者: Vasily Gorbik

s390/sysinfo: get rid of register asm

Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
上级 53c1c250
...@@ -25,19 +25,22 @@ int topology_max_mnest; ...@@ -25,19 +25,22 @@ int topology_max_mnest;
static inline int __stsi(void *sysinfo, int fc, int sel1, int sel2, int *lvl) static inline int __stsi(void *sysinfo, int fc, int sel1, int sel2, int *lvl)
{ {
register int r0 asm("0") = (fc << 28) | sel1; int r0 = (fc << 28) | sel1;
register int r1 asm("1") = sel2;
int rc = 0; int rc = 0;
asm volatile( asm volatile(
" stsi 0(%3)\n" " lr 0,%[r0]\n"
" lr 1,%[r1]\n"
" stsi 0(%[sysinfo])\n"
"0: jz 2f\n" "0: jz 2f\n"
"1: lhi %1,%4\n" "1: lhi %[rc],%[retval]\n"
"2:\n" "2: lr %[r0],0\n"
EX_TABLE(0b, 1b) EX_TABLE(0b, 1b)
: "+d" (r0), "+d" (rc) : [r0] "+d" (r0), [rc] "+d" (rc)
: "d" (r1), "a" (sysinfo), "K" (-EOPNOTSUPP) : [r1] "d" (sel2),
: "cc", "memory"); [sysinfo] "a" (sysinfo),
[retval] "K" (-EOPNOTSUPP)
: "cc", "0", "1", "memory");
*lvl = ((unsigned int) r0) >> 28; *lvl = ((unsigned int) r0) >> 28;
return rc; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册