[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 33/73] tcg/aarch64: Expand extract with offset 0 with andi
From: |
Richard Henderson |
Subject: |
[PATCH 33/73] tcg/aarch64: Expand extract with offset 0 with andi |
Date: |
Thu, 2 Jan 2025 10:06:13 -0800 |
We're about to change canonicalization of masks as extract
instead of and. Retain the andi expansion here.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.c.inc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index d77d305f30..828897ccd8 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -2454,7 +2454,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
case INDEX_op_extract_i64:
case INDEX_op_extract_i32:
- tcg_out_ubfm(s, ext, a0, a1, a2, a2 + args[3] - 1);
+ if (a2 == 0) {
+ uint64_t mask = MAKE_64BIT_MASK(0, args[3]);
+ tcg_out_logicali(s, I3404_ANDI, ext, a0, a1, mask);
+ } else {
+ tcg_out_ubfm(s, ext, a0, a1, a2, a2 + args[3] - 1);
+ }
break;
case INDEX_op_sextract_i64:
--
2.43.0
- [PATCH 07/73] tcg: Add TCGType argument to tcg_op_supported, (continued)
- [PATCH 07/73] tcg: Add TCGType argument to tcg_op_supported, Richard Henderson, 2025/01/02
- [PATCH 18/73] tcg: Move fallback tcg_can_emit_vec_op out of line, Richard Henderson, 2025/01/02
- [PATCH 23/73] tcg/mips: Expand bswap unconditionally, Richard Henderson, 2025/01/02
- [PATCH 13/73] target/i386: Use tcg_op_deposit_valid, Richard Henderson, 2025/01/02
- [PATCH 14/73] target/i386: Use tcg_op_supported, Richard Henderson, 2025/01/02
- [PATCH 32/73] tcg/aarch64: Provide TCG_TARGET_{s}extract_valid, Richard Henderson, 2025/01/02
- [PATCH 33/73] tcg/aarch64: Expand extract with offset 0 with andi,
Richard Henderson <=
- [PATCH 28/73] tcg: Merge TCG_TARGET_HAS_{add2,sub2}, Richard Henderson, 2025/01/02
- [PATCH 06/73] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc, Richard Henderson, 2025/01/02
- [PATCH 09/73] target/arm: Use tcg_op_supported, Richard Henderson, 2025/01/02
- [PATCH 21/73] tcg: Merge TCG_TARGET_HAS_{div,rem,div2}, Richard Henderson, 2025/01/02
- [PATCH 19/73] tcg: Split out tcg-target-has.h and tcg-has.h, Richard Henderson, 2025/01/02