Skip to content
  • Thomas Huth's avatar
    s390x/selftest: Fix constraint of inline assembly · a1e07bc1
    Thomas Huth authored
    
    
    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: <20200924111746.131633-1-thuth@redhat.com>
    Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
    a1e07bc1