[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/24] tcg-ppc64: Implement deposit
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 19/24] tcg-ppc64: Implement deposit |
Date: |
Mon, 18 Feb 2013 12:21:08 -0800 |
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/ppc64/tcg-target.c | 12 ++++++++++++
tcg/ppc64/tcg-target.h | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index a1be15a..2b9309d 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -1764,6 +1764,15 @@ static void tcg_out_op (TCGContext *s, TCGOpcode opc,
const TCGArg *args,
}
break;
+ case INDEX_op_deposit_i32:
+ tcg_out_rlw(s, RLWIMI, args[0], args[2], args[3],
+ 32 - args[3] - args[4], 31 - args[3]);
+ break;
+ case INDEX_op_deposit_i64:
+ tcg_out_rld(s, RLDIMI, args[0], args[2], args[3],
+ 64 - args[3] - args[4]);
+ break;
+
default:
tcg_dump_ops (s);
tcg_abort ();
@@ -1886,6 +1895,9 @@ static const TCGTargetOpDef ppc_op_defs[] = {
{ INDEX_op_bswap32_i64, { "r", "r" } },
{ INDEX_op_bswap64_i64, { "r", "r" } },
+ { INDEX_op_deposit_i32, { "r", "0", "r" } },
+ { INDEX_op_deposit_i64, { "r", "0", "r" } },
+
{ -1 },
};
diff --git a/tcg/ppc64/tcg-target.h b/tcg/ppc64/tcg-target.h
index a8cf4f0..96be377 100644
--- a/tcg/ppc64/tcg-target.h
+++ b/tcg/ppc64/tcg-target.h
@@ -87,7 +87,7 @@ typedef enum {
#define TCG_TARGET_HAS_eqv_i32 1
#define TCG_TARGET_HAS_nand_i32 1
#define TCG_TARGET_HAS_nor_i32 1
-#define TCG_TARGET_HAS_deposit_i32 0
+#define TCG_TARGET_HAS_deposit_i32 1
#define TCG_TARGET_HAS_movcond_i32 0
#define TCG_TARGET_HAS_div_i64 1
@@ -106,7 +106,7 @@ typedef enum {
#define TCG_TARGET_HAS_eqv_i64 1
#define TCG_TARGET_HAS_nand_i64 1
#define TCG_TARGET_HAS_nor_i64 1
-#define TCG_TARGET_HAS_deposit_i64 0
+#define TCG_TARGET_HAS_deposit_i64 1
#define TCG_TARGET_HAS_movcond_i64 0
#define TCG_AREG0 TCG_REG_R27
--
1.8.1.2
- [Qemu-devel] [PATCH 09/24] tcg-ppc64: Rearrange integer constant constraints, (continued)
- [Qemu-devel] [PATCH 09/24] tcg-ppc64: Rearrange integer constant constraints, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 11/24] tcg-ppc64: Tidy or and xor patterns., Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 13/24] tcg-ppc64: Improve and_i64 with constant, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 16/24] tcg-ppc64: Implement bswap16 and bswap32, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 12/24] tcg-ppc64: Improve and_i32 with constant, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 10/24] tcg-ppc64: Improve constant add and sub ops., Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 17/24] tcg-ppc64: Implement bswap64, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 14/24] tcg-ppc64: Streamline qemu_ld/st insn selection, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 15/24] tcg-ppc64: Implement rotates, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 22/24] tcg-ppc64: Rewrite setcond, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 19/24] tcg-ppc64: Implement deposit,
Richard Henderson <=
- [Qemu-devel] [PATCH 20/24] tcg-ppc64: Use I constraint for mul, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 18/24] tcg-ppc64: Implement compound logicals, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 21/24] tcg-ppc64: Use TCGType throughout compares, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 24/24] tcg-ppc64: Use getauxval for ISA detection, Richard Henderson, 2013/02/18
- [Qemu-devel] [PATCH 23/24] tcg-ppc64: Implement movcond, Richard Henderson, 2013/02/18