All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] tcg/riscv64: Fix AUIPC pair range validation
@ 2026-09-14  0:08 Richard Henderson
  2026-09-14  0:08 ` [PATCH v3 01/11] tcg/riscv64: Return tcg_insn_unit from insn encoders Richard Henderson
                   ` (12 more replies)
  0 siblings, 13 replies; 32+ messages in thread
From: Richard Henderson @ 2026-09-14  0:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: max.chou, palmer, daniel.barboza, Alistair.Francis, philmd

Hi Max,

In v2, the change from int32_t to uint32_t is pretty much
the opposite of what should have been done, since all of
these are logically signed values.  I've adjusted all of
the encoders to take signed inputs and assert in range.

In the process, I noticed tha the branch range tests were
off by one.  Now all performed in exactly one place.

Finally, tcg_out_ldst needed updates for AUIPC as well.

I've tested this lightly so far; full testing on a rather
slow riscv machine is still on-going.


r~


Max Chou (2):
  tcg/riscv64: Validate AUIPC relocation range
  tcg/riscv64: Fall back when AUIPC pairs are out of range

Richard Henderson (9):
  tcg/riscv64: Return tcg_insn_unit from insn encoders
  tcg/riscv64: Rename sb-type to b-type format
  tcg/riscv64: Rename uj-type to j-type format
  tcg/riscv64: Use signed type for encoding immediates
  tcg/riscv64: Adjust sign of lui immediate in tcg_out_movi
  tcg/riscv64: Assert immediate in range for [isu]-type insns
  tcg/riscv64: Return success from encode_jimm
  tcg/riscv64: Return success from encode_bimm
  tcg/riscv64: Fix off-by-one in branch range tests

 tcg/riscv64/tcg-target.c.inc | 230 ++++++++++++++++++-----------------
 1 file changed, 121 insertions(+), 109 deletions(-)

-- 
2.53.0



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

end of thread, other threads:[~2026-09-30  3:42 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14  0:08 [PATCH v3 00/11] tcg/riscv64: Fix AUIPC pair range validation Richard Henderson
2026-09-14  0:08 ` [PATCH v3 01/11] tcg/riscv64: Return tcg_insn_unit from insn encoders Richard Henderson
2026-09-28  3:28   ` Alistair Francis
2026-09-29 15:42   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 02/11] tcg/riscv64: Rename sb-type to b-type format Richard Henderson
2026-09-28  3:30   ` Alistair Francis
2026-09-29 15:43   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 03/11] tcg/riscv64: Rename uj-type to j-type format Richard Henderson
2026-09-28  3:30   ` Alistair Francis
2026-09-29 15:44   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 04/11] tcg/riscv64: Use signed type for encoding immediates Richard Henderson
2026-09-28  3:38   ` Alistair Francis
2026-09-29 15:44   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 05/11] tcg/riscv64: Adjust sign of lui immediate in tcg_out_movi Richard Henderson
2026-09-28  3:33   ` Alistair Francis
2026-09-29 15:52   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 06/11] tcg/riscv64: Assert immediate in range for [isu]-type insns Richard Henderson
2026-09-28  3:33   ` Alistair Francis
2026-09-29 15:57   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 07/11] tcg/riscv64: Return success from encode_jimm Richard Henderson
2026-09-29 16:00   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 08/11] tcg/riscv64: Return success from encode_bimm Richard Henderson
2026-09-29 16:01   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 09/11] tcg/riscv64: Fix off-by-one in branch range tests Richard Henderson
2026-09-29 16:26   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 10/11] tcg/riscv64: Validate AUIPC relocation range Richard Henderson
2026-09-29 16:32   ` Max Chou
2026-09-14  0:08 ` [PATCH v3 11/11] tcg/riscv64: Fall back when AUIPC pairs are out of range Richard Henderson
2026-09-29 16:32   ` Max Chou
2026-09-15  9:47 ` [PATCH v3 00/11] tcg/riscv64: Fix AUIPC pair range validation Max Chou
2026-09-27 17:30 ` Richard Henderson
2026-09-30  3:42   ` Max Chou

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.