On 5/19/26 13:52, Philippe Mathieu-Daudé wrote:
On 19/5/26 18:22, James Hilliard wrote:
From: Richard Henderson <[email protected]>
Add a helper for multi-limb 64-bit addition. The helper emits native
carry-chain TCG ops when they are available and falls back to explicit
carry propagation otherwise.
This lets target translators build wider integer accumulators inline
without open-coding the same add-with-carry sequence at each use site.
Signed-off-by: Richard Henderson <[email protected]>
---
Changes v7 -> v8:
- New patch from Richard Henderson's v7.5 multiplier rework.
---
include/tcg/tcg-op-common.h | 1 +
tcg/tcg-op.c | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
Richard, could we squash something like this?
-- >8 --
diff --git a/docs/devel/tcg-ops.rst b/docs/devel/tcg-ops.rst
index fd3a50bf4c4..1ac53a61114 100644
--- a/docs/devel/tcg-ops.rst
+++ b/docs/devel/tcg-ops.rst
@@ -672,6 +672,12 @@ Multiword arithmetic support
| If mulu2/muls2 are not provided by the backend, the tcg-op generator
can obtain the same results by emitting a pair of opcodes, mul +
muluh/mulsh.
+ * - addN *n*, *t0*, *t1*, *t2*
+
+ - | For each *n*, compute *t0* = *t1* + *t2* + *C*,
+ where *C* is the input carry bit provided by the host
+ architecture, and also compute the output carry bit.
+ Overlap between *t0* and *t1*/*t2* arrays is not allowed.
No, because there's no addN *opcode*. You're raising an old issue: there's no separate
documentation for the tcg_gen_* interface. Also, the text is inaccurate.
r~