The {div,divu}2 opcodes are intended for systems for which the
division instruction produces both quotient and remainder. Sparc
is not such a system. Indeed, the remainder must be computed as
quot = a / b
rem = a - (quot * b)
Split out a tcg_out_div32 function that properly initializes Y
On 01/11/2010 11:09 AM, Richard Henderson wrote:
+/* Load Y with the sign/zero extension of RS1 to 64-bits. */
+if (uns) {
+tcg_out_sety(s, TCG_REG_G0);
+} else {
+tcg_out_arith(s, TCG_REG_I5, rs1, 31, SHIFT_SRA);
Bah. tcg_out_arithi.
Programming by code