qemu/tests/tcg/s390x/hello-s390x-asm.S
Ilya Leoshkevich cb2d7e63d1 tests/tcg/s390x: Fix test-svc with clang
clang does not support expressions involving symbols in instructions
like lghi yet, so building hello-s390x-asm.S with it fails.

Move the expression to the literal pool and load it from there.

Fixes: be4a4cb429 ("tests/tcg/s390x: Test single-stepping SVC")
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230707154242.457706-1-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-07-10 15:34:57 +02:00

23 lines
256 B
ArmAsm

/*
* Hello, World! in assembly.
*/
.globl _start
_start:
/* puts("Hello, World!"); */
lghi %r2,1
larl %r3,foo
lgrl %r4,foo_len
svc 4
/* exit(0); */
xgr %r2,%r2
svc 1
.align 2
foo: .asciz "Hello, World!\n"
foo_end:
.align 8
foo_len: .quad foo_end-foo