From: Andrew Cooper Date: Tue, 3 Oct 2023 10:05:22 +0000 (+0100) Subject: Work around Clang IAS error with XSA-304 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f0dd2fbc094598c625e96748f6ac64acec8fc725;p=people%2Fandrewcoop%2Fxen-test-framework.git Work around Clang IAS error with XSA-304 Clang complains: :1:19: error: expected assembly-time absolute expression .align 4096;.skip 4096 - (stub_page_boundary - stub_fn); ^ Opencode the je Links: https://github.com/llvm/llvm-project/issues/68086 Signed-off-by: Andrew Cooper --- diff --git a/tests/xsa-304/main.c b/tests/xsa-304/main.c index 7f8be08..5d343e9 100644 --- a/tests/xsa-304/main.c +++ b/tests/xsa-304/main.c @@ -46,9 +46,12 @@ asm (".align 4096;" /* * %rsi points at `bool cond = true` on the stack, so this jump won't * actually be taken, but we want speculation to follow it. + * + * Work around https://github.com/llvm/llvm-project/issues/68086 + * Clang IAS can't cope with `je 1f` so opencode it. */ " cmpb $0, (%rsi);" - " je 1f;" + " .byte 0x74, 1f - (. + 1);" // je 1f /* * Write into the top of linear address space. Because no A/D bits are