qemu-e2k/tests/tcg/s390x
Thomas Huth 2b4e8cf050 tests/tcg/s390x: Fix the exrl-trt* tests with Clang
The exrl-trt* tests use two pre-initialized variables for the
results of the assembly code:

    uint64_t r1 = 0xffffffffffffffffull;
    uint64_t r2 = 0xffffffffffffffffull;

But then the assembly code copies over the full contents
of the register into the output variable, without taking
care of this pre-initialized values:

        "    lgr %[r1],%%r1\n"
        "    lgr %[r2],%%r2\n"

The code then finally compares the register contents to
a value that apparently depends on the pre-initialized values:

    if (r2 != 0xffffffffffffffaaull) {
        write(1, "bad r2\n", 7);
        return 1;
    }

This all works with GCC, since the 0xffffffffffffffff got into
the r2 register there by accident, but it fails completely with
Clang.

Let's fix this by declaring the r1 and r2 variables as proper
register variables instead, so the pre-initialized values get
correctly passed into the inline assembly code.

Message-Id: <20220301092431.1448419-1-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-03-07 09:06:32 +01:00
..
gdbstub tests/tcg/s390x: Test SIGILL and SIGSEGV handling 2021-09-06 16:23:12 +02:00
Makefile.target Testing and semihosting updates: 2022-03-02 10:46:16 +00:00
csst.c tests/tcg/s390x: Fix alignment of csst parameter list 2019-06-21 15:26:53 +02:00
exrl-trt.c tests/tcg/s390x: Fix the exrl-trt* tests with Clang 2022-03-07 09:06:32 +01:00
exrl-trtr.c tests/tcg/s390x: Fix the exrl-trt* tests with Clang 2022-03-07 09:06:32 +01:00
hello-s390x.c
ipm.c target/s390x: fix IPM polluting irrelevant bits 2018-08-28 17:37:01 +02:00
mie3-compl.c tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3 2022-02-28 11:29:15 +01:00
mie3-mvcrl.c tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3 2022-02-28 11:29:15 +01:00
mie3-sel.c tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3 2022-02-28 11:29:15 +01:00
mvc.c tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang 2022-03-07 09:04:42 +01:00
mvo.c tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang 2022-03-07 09:04:42 +01:00
pack.c tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang 2022-03-07 09:04:42 +01:00
shift.c tests/tcg/s390x: Test shift instructions 2022-01-17 08:36:33 +01:00
signals-s390x.c tests/tcg/s390x: Test SIGILL and SIGSEGV handling 2021-09-06 16:23:12 +02:00
trap.c tests/tcg: Test that compare-and-trap raises SIGFPE 2021-08-03 15:17:38 +02:00