tcg: Merge INDEX_op_divu2_{i32,i64}

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-01-07 18:23:17 -08:00
parent 9bf558ed17
commit 8109598b68
4 changed files with 21 additions and 14 deletions

View file

@ -307,6 +307,16 @@ Arithmetic
pass *nh* as a simple sign-extension of *nl*, so the only
overflow should be *INT_MIN* / -1.
* - divu2 *q*, *r*, *nl*, *nh*, *d*
- | *q* = *nh:nl* / *d* (unsigned)
| *r* = *nh:nl* % *d*
| Undefined behaviour if division by zero, or the double-word
numerator divided by the single-word divisor does not fit
within the single-word quotient. The code generator will
pass 0 to *nh* to make a simple zero-extension of *nl*,
so overflow should never occur.
Logical
-------