[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 05/32] Add VSX Instruction Decoders
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 05/32] Add VSX Instruction Decoders |
Date: |
Fri, 20 Dec 2013 02:00:27 +0100 |
From: Tom Musta <address@hidden>
This patch adds decoders for the VSX fields XT, XS, XA, XB and
DM. The first four are split fields and a general helper for
these types of fields is also added.
Signed-off-by: Tom Musta <address@hidden>
Signed-off-by: Anton Blanchard <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 415f5d1..de2c764 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -366,6 +366,12 @@ static inline int32_t name(uint32_t opcode)
\
return (int16_t)((opcode >> (shift)) & ((1 << (nb)) - 1)); \
}
+#define EXTRACT_HELPER_SPLIT(name, shift1, nb1, shift2, nb2) \
+static inline uint32_t name(uint32_t opcode) \
+{ \
+ return (((opcode >> (shift1)) & ((1 << (nb1)) - 1)) << nb2) | \
+ ((opcode >> (shift2)) & ((1 << (nb2)) - 1)); \
+}
/* Opcode part 1 */
EXTRACT_HELPER(opc1, 26, 6);
/* Opcode part 2 */
@@ -480,6 +486,11 @@ static inline target_ulong MASK(uint32_t start, uint32_t
end)
return ret;
}
+EXTRACT_HELPER_SPLIT(xT, 0, 1, 21, 5);
+EXTRACT_HELPER_SPLIT(xS, 0, 1, 21, 5);
+EXTRACT_HELPER_SPLIT(xA, 2, 1, 16, 5);
+EXTRACT_HELPER_SPLIT(xB, 1, 1, 11, 5);
+EXTRACT_HELPER(DM, 8, 2);
/*****************************************************************************/
/* PowerPC instructions table */
--
1.8.1.4
- [Qemu-ppc] [PULL 00/32] ppc patch queue 2013-12-20, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 04/32] Add MSR VSX and Associated Exception, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 02/32] powerpc: add PVR mask support, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 07/32] Add lxvd2x, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 08/32] Add stxvd2x, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 06/32] Add VSR to Global Registers, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 05/32] Add VSX Instruction Decoders,
Alexander Graf <=
- [Qemu-ppc] [PULL 03/32] Declare and Enable VSX, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 11/32] Add lxvdsx, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 01/32] target-ppc: add stubs for KVM breakpoints, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 14/32] Add stxvw4x, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 24/32] Add xxmrgh/xxmrgl, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 10/32] Add lxsdx, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 09/32] Add xxpermdi, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 13/32] Add stxsdx, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 12/32] Add lxvw4x, Alexander Graf, 2013/12/19
- [Qemu-ppc] [PULL 15/32] target-ppc: move POWER7+ to a separate family, Alexander Graf, 2013/12/19