|
| From: | Richard Henderson |
| Subject: | Re: [PATCH v1 10/15] tcg/riscv: Implement vector not/neg ops |
| Date: | Wed, 14 Aug 2024 19:45:59 +1000 |
| User-agent: | Mozilla Thunderbird |
On 8/13/24 21:34, LIU Zhiwei wrote:
@@ -2312,6 +2314,12 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
case INDEX_op_xor_vec:
tcg_out_opc_vv(s, OPC_VXOR_VV, a0, a1, a2, true);
break;
+ case INDEX_op_not_vec:
+ tcg_out_opc_vi(s, OPC_VXOR_VI, a0, a1, -1, true);
+ break;
+ case INDEX_op_neg_vec:
+ tcg_out_opc_vx(s, OPC_VRSUB_VX, a0, a1, TCG_REG_ZERO, true);
+ break;
Any reason not to use vrsub.vi? Not wrong, just surprising. Obviously, NOT does not require SEW change. r~
| [Prev in Thread] | Current Thread | [Next in Thread] |