qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 20/30] tcg/loongarch: Implement setcond ops


From: Richard Henderson
Subject: Re: [PATCH 20/30] tcg/loongarch: Implement setcond ops
Date: Mon, 20 Sep 2021 09:24:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/20/21 1:04 AM, WANG Xuerui wrote:
+    switch (cond) {
+    case TCG_COND_EQ:
+        tcg_out_opc_sub_d(s, ret, arg1, arg2);
+        tcg_out_opc_sltui(s, ret, ret, 1);
+        break;
+    case TCG_COND_NE:
+        tcg_out_opc_sub_d(s, ret, arg1, arg2);
+        tcg_out_opc_sltu(s, ret, TCG_REG_ZERO, ret);
+        break;

You accept zero as input; you'll want to skip the subtract in that case.

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]