will be in the maintainance mode on Wednesday June 29th 01:00 - 10:00 (UTC+1). Repositories is read only during the maintainance.

Commit a1e07bc1 authored by Thomas Huth's avatar Thomas Huth
Browse files

s390x/selftest: Fix constraint of inline assembly

Clang on s390x compains:

/home/thuth/devel/kvm-unit-tests/s390x/selftest.c:39:15: error:
 %r0 used in an address
        asm volatile("  stg %0,0(%0)\n" : : "r"(-1L));
<inline asm>:1:13: note: instantiated into assembly here
                stg %r0,0(%r0)

Right it is. We should not use address register 0 for STG.
Thus let's use the "a" constraint to avoid register 0 here.

Message-Id: <>
Reviewed-by: default avatarDavid Hildenbrand <>
Signed-off-by: default avatarThomas Huth <>
parent 238b5967
......@@ -36,7 +36,7 @@ static void test_pgm_int(void)
asm volatile(" stg %0,0(%0)\n" : : "r"(-1L));
asm volatile(" stg %0,0(%0)\n" : : "a"(-1L));
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