[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 3/7] Add VSX Instruction Decoders
From: |
Tom Musta |
Subject: |
[Qemu-ppc] [PATCH 3/7] Add VSX Instruction Decoders |
Date: |
Tue, 24 Sep 2013 10:02:41 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
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>
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 21c272f..d80ed8a 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -370,6 +370,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 */
@@ -484,6 +490,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, 1, 1, 16, 5);
+EXTRACT_HELPER_SPLIT(xB, 2, 1, 11, 5);
+EXTRACT_HELPER(DM, 8, 2);
/*****************************************************************************/
/* PowerPC instructions
table */
--
1.7.1
- [Qemu-ppc] [PATCH 0/7] Stage 1 VSX Support, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 1/7] Declare and Enable VSX, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 2/7] Add MSR VSX and Associated Exception, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 3/7] Add VSX Instruction Decoders,
Tom Musta <=
- [Qemu-ppc] [PATCH 4/7] Add VSR to Global Registers, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 5/7] Add lxvd2x, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 6/7] Add stxvd2x, Tom Musta, 2013/09/24
- [Qemu-ppc] [PATCH 7/7] Add xxpermdi, Tom Musta, 2013/09/24
- Re: [Qemu-ppc] [PATCH 0/7] Stage 1 VSX Support, Alexander Graf, 2013/09/25