All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] semihosting: Fix auto-strlen for 32-bit targets + add riscv32 test
@ 2026-06-19  9:52 Nikita Shubin
  2026-06-19  9:52 ` [PATCH 1/2] semihosting/arm-compat-semi: Fix auto‑strlen detection for 32‑bit targets Nikita Shubin
  2026-06-19  9:52 ` [PATCH 2/2] tests/tcg/riscv32: Add RISC-V 32-bit semihosting test Nikita Shubin
  0 siblings, 2 replies; 5+ messages in thread
From: Nikita Shubin @ 2026-06-19  9:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Paolo Bonzini, Nikita Shubin

This short series fixes a regression in semihosting's automatic string length
detection for 32‑bit targets, introduced when target_ulong was replaced with
uint64_t. The first patch restores the original behaviour where passing
-1 (0xffffffff) in arg2 triggers the auto‑length logic by detecting the
32‑bit sentinel and promoting it to the 64‑bit equivalent.

The second patch extends the TCG test suite with a new RISC‑V 32‑bit
semihosting test that exercises SYS_OPEN with auto‑length, verifying that
the fix works correctly on qemu-system-riscv32.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Nikita Shubin (2):
      semihosting/arm-compat-semi: Fix auto‑strlen detection for 32‑bit targets
      tests/tcg/riscv32: Add RISC-V 32-bit semihosting test

 configure                                 |  6 +++-
 semihosting/arm-compat-semi.c             | 11 ++++++
 tests/tcg/riscv32/Makefile.softmmu-target | 30 +++++++++++++++++
 tests/tcg/riscv32/semihost.ld             | 24 +++++++++++++
 tests/tcg/riscv32/test-semihosting-open.S | 56 +++++++++++++++++++++++++++++++
 5 files changed, 126 insertions(+), 1 deletion(-)
---
base-commit: 3b50303f9563a42538a1fd5c0ea7f952e23016e1
change-id: 20260619-fix-sign-extended-32-bit-addresses-68eba061cd9a

Best regards,
-- 
Nikita Shubin



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

end of thread, other threads:[~2026-06-23 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-19  9:52 [PATCH 0/2] semihosting: Fix auto-strlen for 32-bit targets + add riscv32 test Nikita Shubin
2026-06-19  9:52 ` [PATCH 1/2] semihosting/arm-compat-semi: Fix auto‑strlen detection for 32‑bit targets Nikita Shubin
2026-06-23 12:40   ` Alex Bennée
2026-06-19  9:52 ` [PATCH 2/2] tests/tcg/riscv32: Add RISC-V 32-bit semihosting test Nikita Shubin
2026-06-22  4:32   ` Alistair Francis

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.