mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
tcg: Merge INDEX_op_div2_{i32,i64}
Rename to INDEX_op_divs2 to emphasize signed inputs, and mirroring INDEX_op_divu2_*. Document the opcode. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d6cad9c927
commit
ee1805b9e6
4 changed files with 20 additions and 14 deletions
|
@ -297,6 +297,15 @@ Arithmetic
|
|||
- | *t0* = *t1* % *t2* (unsigned)
|
||||
| Undefined behavior if division by zero.
|
||||
|
||||
* - divs2 *q*, *r*, *nl*, *nh*, *d*
|
||||
|
||||
- | *q* = *nh:nl* / *d* (signed)
|
||||
| *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 *nh* as a simple sign-extension of *nl*, so the only
|
||||
overflow should be *INT_MIN* / -1.
|
||||
|
||||
Logical
|
||||
-------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue