On 8/20/25 04:21, Kohei Tokunaga wrote:
+static void tcg_wasm_out_neg(TCGContext *s, TCGReg ret, TCGReg arg) +{ + tcg_wasm_out_op_idx(s, OPC_GLOBAL_GET, REG_IDX(arg)); + tcg_wasm_out_op_not(s); + tcg_wasm_out_op_const(s, OPC_I64_CONST, 1); + tcg_wasm_out_op(s, OPC_I64_ADD); + tcg_wasm_out_op_idx(s, OPC_GLOBAL_SET, REG_IDX(ret)); +}
This is an odd expansion. I would have expected ret = 0 - arg. r~