All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix building tools/tests/x86_emulator with clang-21
@ 2026-02-23 10:04 Edwin Török
  2026-02-23 10:04 ` [PATCH 1/4] tools/tests/x86_emulator: fix 'shifting a negative signed value is undefined' Edwin Török
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Edwin Török @ 2026-02-23 10:04 UTC (permalink / raw)
  To: xen-devel
  Cc: Edwin Török, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Anthony PERARD

While working on another patch series I noticed that `clang-21` cannot
build `tools/tests/x86_emulator`. Once I fixed that `xmm0` related tests
failed, because `clang` doesn't support `-ffixed-xmm0`.

This series fixes building and running the test with `clang`.

There might still be some latent bugs in the tests though, i.e. `xmm0` may not
be the only reason it fails on clang: the `fxsave` tests have
2 overlapping areas of memory at `res + 0x80`, and `res + 0x100` of length `0x200`.
Instead the 2nd area should start at `0x280`, and the memset should
clear an area of `0x480`.
I didn't attempt to fix all those, because attempting to do so caused
the tests to start failing on GCC.

For convenience this patch series is also available at:
https://gitlab.com/xen-project/people/edwintorok/xen/-/compare/staging...private%2Fedvint%2Femulator?from_project_id=2336572
https://gitlab.com/xen-project/people/edwintorok/xen/-/pipelines/2343355874

Edwin Török (4):
  tools/tests/x86_emulator: fix 'shifting a negative signed value is
    undefined'
  tools/tests/x86_emulator: avoid duplicating loop body
  tools/tests/x86_emulator: fix build on clang-21
  tools/tests/x86_emulator: disable xmm* tests on clang

 tools/tests/x86_emulator/Makefile            |  1 +
 tools/tests/x86_emulator/test_x86_emulator.c | 48 +++++++++++++++++++-
 2 files changed, 47 insertions(+), 2 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-02-27 11:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 10:04 [PATCH 0/4] Fix building tools/tests/x86_emulator with clang-21 Edwin Török
2026-02-23 10:04 ` [PATCH 1/4] tools/tests/x86_emulator: fix 'shifting a negative signed value is undefined' Edwin Török
2026-02-23 15:42   ` Jan Beulich
2026-02-24 10:12     ` Edwin Torok
2026-02-24 10:25       ` Jan Beulich
2026-02-23 10:04 ` [PATCH 2/4] tools/tests/x86_emulator: avoid duplicating loop body Edwin Török
2026-02-23 15:57   ` Jan Beulich
2026-02-24  9:21     ` Edwin Torok
2026-02-23 10:04 ` [PATCH 3/4] tools/tests/x86_emulator: fix build on clang-21 Edwin Török
2026-02-23 16:02   ` Jan Beulich
2026-02-23 16:06     ` Andrew Cooper
2026-02-23 16:21       ` Jan Beulich
2026-02-23 16:36         ` Andrew Cooper
2026-02-23 16:40           ` Jan Beulich
2026-02-23 10:04 ` [PATCH 4/4] tools/tests/x86_emulator: disable xmm* tests on clang Edwin Török
2026-02-23 16:10   ` Jan Beulich
2026-02-24  9:34     ` Edwin Torok
2026-02-24  9:48       ` Jan Beulich
2026-02-27 11:02         ` Edwin Torok

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.