Skip to content
Commit 21675e2d authored by Thomas Huth's avatar Thomas Huth
Browse files

lib/s390x: Fix the epsw inline assembly



According to the Principles of Operation, the epsw instruction
does not touch the second register if it is r0. With GCC we were
lucky so far that it never tried to use r0 here, but when compiling
the kvm-unit-tests with Clang, this indeed happens and leads to
very weird crashes. Thus let's make sure to never use r0 for the
second operand of the epsw instruction.

While we're at it, also change the constraint modifier from "+" to
"=" since these are only output parameters, not input.

Message-Id: <20210622135517.234801-4-thuth@redhat.com>
Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: default avatarJanosch Frank <frankja@linux.ibm.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 5b1a473f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment