[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 31/37] target/ppc: simplify VEXT_SIGNED macro in int_he
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 31/37] target/ppc: simplify VEXT_SIGNED macro in int_helper.c |
Date: |
Mon, 4 Feb 2019 20:01:18 +1100 |
From: Mark Cave-Ayland <address@hidden>
As pointed out by Richard: it does not need the mask argument, nor does it need
the recast argument. The masking is implied by the cast argument, and the
recast is implied by the assignment.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/int_helper.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index 355b6630a2..ffc9cbc4ed 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -2024,19 +2024,19 @@ void helper_xxinsertw(CPUPPCState *env, target_ulong
xtn,
putVSR(xtn, &xt, env);
}
-#define VEXT_SIGNED(name, element, mask, cast, recast) \
+#define VEXT_SIGNED(name, element, cast) \
void helper_##name(ppc_avr_t *r, ppc_avr_t *b) \
{ \
int i; \
VECTOR_FOR_INORDER_I(i, element) { \
- r->element[i] = (recast)((cast)(b->element[i] & mask)); \
+ r->element[i] = (cast)b->element[i]; \
} \
}
-VEXT_SIGNED(vextsb2w, s32, UINT8_MAX, int8_t, int32_t)
-VEXT_SIGNED(vextsb2d, s64, UINT8_MAX, int8_t, int64_t)
-VEXT_SIGNED(vextsh2w, s32, UINT16_MAX, int16_t, int32_t)
-VEXT_SIGNED(vextsh2d, s64, UINT16_MAX, int16_t, int64_t)
-VEXT_SIGNED(vextsw2d, s64, UINT32_MAX, int32_t, int64_t)
+VEXT_SIGNED(vextsb2w, s32, int8_t)
+VEXT_SIGNED(vextsb2d, s64, int8_t)
+VEXT_SIGNED(vextsh2w, s32, int16_t)
+VEXT_SIGNED(vextsh2d, s64, int16_t)
+VEXT_SIGNED(vextsw2d, s64, int32_t)
#undef VEXT_SIGNED
#define VNEG(name, element) \
--
2.20.1
- [Qemu-ppc] [PULL 28/37] target/ppc: rework vmul{e, o}{s, u}{b, h, w} instructions to use Vsr* macros, (continued)
- [Qemu-ppc] [PULL 28/37] target/ppc: rework vmul{e, o}{s, u}{b, h, w} instructions to use Vsr* macros, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 23/37] spapr: Drop unused parameters from fdt building helper, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 25/37] QemuMacDrivers: update qemu_vga.ndrv to 90c488d built from submodule, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 20/37] hw/ppc: Move ppc40x_*reset() functions from ppc405_uc.c to ppc.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 21/37] MAINTAINERS: XIVE is an interrupt controller, not a machine, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 37/37] mmap-alloc: fix hugetlbfs misaligned length in ppc64, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 32/37] target/ppc: remove ROTRu32 and ROTRu64 macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 26/37] hw/ppc/spapr: Add support for "-vga cirrus", David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 16/37] ppc/pnv: introduce a CPU machine_data, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 34/37] spapr_pci: Fix endianness in assigned-addresses property, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 31/37] target/ppc: simplify VEXT_SIGNED macro in int_helper.c,
David Gibson <=
- [Qemu-ppc] [PULL 29/37] target/ppc: eliminate use of HI_IDX and LO_IDX macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 33/37] target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 30/37] target/ppc: eliminate use of EL_IDX macros from int_helper.c, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 35/37] hw/ppc: Don't include m48t59.h if it is not necessary, David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 36/37] mmap-alloc: unfold qemu_ram_mmap(), David Gibson, 2019/02/04
- [Qemu-ppc] [PULL 07/37] sam460ex: Fix support for memory larger than 1GB, David Gibson, 2019/02/04
- Re: [Qemu-ppc] [PULL 00/37] ppc-for-4.0 queue 20190204, Peter Maydell, 2019/02/04
- [Qemu-ppc] [PULL 01/37] pseries: Update SLOF firmware image, David Gibson, 2019/02/04