On 2/26/23 19:42, Richard Henderson wrote:
  static void gen_saturate_u(TCGv ret, TCGv arg, int32_t up)
  {
-    TCGv temp = tcg_const_i32(up);
-    /* sat_neg = (arg > up ) ? up : arg; */
-    tcg_gen_movcond_tl(TCG_COND_GTU, ret, arg, temp, temp, arg);
+    tcg_gen_umin_tl(ret, ret, tcg_constant_i32(up));

Second argument must be 'arg'.


r~


Reply via email to