[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 72/81] tcg/loongarch64: Do not accept constant argument to nor
From: |
Richard Henderson |
Subject: |
[PATCH v2 72/81] tcg/loongarch64: Do not accept constant argument to nor |
Date: |
Tue, 7 Jan 2025 00:01:03 -0800 |
The instruction set does not implement nor with immediate.
There is no reason to pretend that we do.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/loongarch64/tcg-target.c.inc | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc
index bc300de523..24d00af2ee 100644
--- a/tcg/loongarch64/tcg-target.c.inc
+++ b/tcg/loongarch64/tcg-target.c.inc
@@ -1420,12 +1420,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
TCGType type,
case INDEX_op_nor_i32:
case INDEX_op_nor_i64:
- if (c2) {
- tcg_out_opc_ori(s, a0, a1, a2);
- tcg_out_opc_nor(s, a0, a0, TCG_REG_ZERO);
- } else {
- tcg_out_opc_nor(s, a0, a1, a2);
- }
+ tcg_out_opc_nor(s, a0, a1, a2);
break;
case INDEX_op_extract_i32:
@@ -2327,8 +2322,7 @@ tcg_target_op_def(TCGOpcode op, TCGType type, unsigned
flags)
case INDEX_op_nor_i32:
case INDEX_op_nor_i64:
- /* LoongArch reg-imm bitops have their imms ZERO-extended */
- return C_O1_I2(r, r, rU);
+ return C_O1_I2(r, r, r);
case INDEX_op_clz_i32:
case INDEX_op_clz_i64:
--
2.43.0
- [PATCH v2 70/81] tcg: Convert nand to TCGOutOpBinary, (continued)
- [PATCH v2 70/81] tcg: Convert nand to TCGOutOpBinary, Richard Henderson, 2025/01/07
- [PATCH v2 73/81] tcg: Convert nor to TCGOutOpBinary, Richard Henderson, 2025/01/07
- [PATCH v2 40/81] tcg/ppc: Fold the ext{8, 16, 32}[us] cases into {s}extract, Richard Henderson, 2025/01/07
- [PATCH v2 43/81] tcg/s390x: Fold the ext{8, 16, 32}[us] cases into {s}extract, Richard Henderson, 2025/01/07
- [PATCH v2 50/81] tcg: Add all_outop[], Richard Henderson, 2025/01/07
- [PATCH v2 51/81] tcg: Merge INDEX_op_mov_{i32,i64}, Richard Henderson, 2025/01/07
- [PATCH v2 72/81] tcg/loongarch64: Do not accept constant argument to nor,
Richard Henderson <=
- [PATCH v2 71/81] tcg: Merge INDEX_op_nand_{i32,i64}, Richard Henderson, 2025/01/07
- [PATCH v2 52/81] tcg: Convert add to TCGOutOpBinary, Richard Henderson, 2025/01/07
- [PATCH v2 54/81] tcg: Convert and to TCGOutOpBinary, Richard Henderson, 2025/01/07
- [PATCH v2 62/81] tcg/optimize: Fold orc with immediate to or, Richard Henderson, 2025/01/07
- [PATCH v2 63/81] tcg: Convert orc to TCGOutOpBinary, Richard Henderson, 2025/01/07
- [PATCH v2 67/81] tcg/optimize: Fold eqv with immediate to xor, Richard Henderson, 2025/01/07