[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/34] target/ppc: declare vmsumsh[ms] helper with call flags
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 22/34] target/ppc: declare vmsumsh[ms] helper with call flags |
Date: |
Thu, 26 May 2022 18:38:03 -0300 |
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
Move vmsumshm and vmsumshs to decodetree, declare vmsumshm helper with
TCG_CALL_NO_RWG, and drop the unused env argument.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220517123929.284511-13-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
target/ppc/helper.h | 4 ++--
target/ppc/insn32.decode | 2 ++
target/ppc/int_helper.c | 5 ++---
target/ppc/translate/vmx-impl.c.inc | 3 ++-
target/ppc/translate/vmx-ops.c.inc | 1 -
5 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/target/ppc/helper.h b/target/ppc/helper.h
index 5127851f2c..5e43920b9e 100644
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -244,8 +244,8 @@ DEF_HELPER_5(vmhaddshs, void, env, avr, avr, avr, avr)
DEF_HELPER_5(vmhraddshs, void, env, avr, avr, avr, avr)
DEF_HELPER_FLAGS_4(VMSUMUHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
DEF_HELPER_5(VMSUMUHS, void, env, avr, avr, avr, avr)
-DEF_HELPER_5(vmsumshm, void, env, avr, avr, avr, avr)
-DEF_HELPER_5(vmsumshs, void, env, avr, avr, avr, avr)
+DEF_HELPER_FLAGS_4(VMSUMSHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
+DEF_HELPER_5(VMSUMSHS, void, env, avr, avr, avr, avr)
DEF_HELPER_FLAGS_4(vmladduhm, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
DEF_HELPER_FLAGS_2(mtvscr, TCG_CALL_NO_RWG, void, env, i32)
DEF_HELPER_FLAGS_1(mfvscr, TCG_CALL_NO_RWG, i32, env)
diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode
index 43ea03c3e7..f001c02a8c 100644
--- a/target/ppc/insn32.decode
+++ b/target/ppc/insn32.decode
@@ -601,6 +601,8 @@ VMULLD 000100 ..... ..... ..... 00111001001 @VX
VMSUMUBM 000100 ..... ..... ..... ..... 100100 @VA
VMSUMMBM 000100 ..... ..... ..... ..... 100101 @VA
+VMSUMSHM 000100 ..... ..... ..... ..... 101000 @VA
+VMSUMSHS 000100 ..... ..... ..... ..... 101001 @VA
VMSUMUHM 000100 ..... ..... ..... ..... 100110 @VA
VMSUMUHS 000100 ..... ..... ..... ..... 100111 @VA
diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c
index 9285a1c2a1..b9dd15d607 100644
--- a/target/ppc/int_helper.c
+++ b/target/ppc/int_helper.c
@@ -890,8 +890,7 @@ void helper_VMSUMMBM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t
*b, ppc_avr_t *c)
}
}
-void helper_vmsumshm(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
- ppc_avr_t *b, ppc_avr_t *c)
+void helper_VMSUMSHM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
{
int32_t prod[8];
int i;
@@ -905,7 +904,7 @@ void helper_vmsumshm(CPUPPCState *env, ppc_avr_t *r,
ppc_avr_t *a,
}
}
-void helper_vmsumshs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
+void helper_VMSUMSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
ppc_avr_t *b, ppc_avr_t *c)
{
int32_t prod[8];
diff --git a/target/ppc/translate/vmx-impl.c.inc
b/target/ppc/translate/vmx-impl.c.inc
index da81296b96..d7524c3204 100644
--- a/target/ppc/translate/vmx-impl.c.inc
+++ b/target/ppc/translate/vmx-impl.c.inc
@@ -2587,9 +2587,9 @@ static bool trans_VSEL(DisasContext *ctx, arg_VA *a)
return true;
}
-GEN_VAFORM_PAIRED(vmsumshm, vmsumshs, 20)
TRANS_FLAGS(ALTIVEC, VMSUMUBM, do_va_helper, gen_helper_VMSUMUBM)
TRANS_FLAGS(ALTIVEC, VMSUMMBM, do_va_helper, gen_helper_VMSUMMBM)
+TRANS_FLAGS(ALTIVEC, VMSUMSHM, do_va_helper, gen_helper_VMSUMSHM)
TRANS_FLAGS(ALTIVEC, VMSUMUHM, do_va_helper, gen_helper_VMSUMUHM)
static bool do_va_env_helper(DisasContext *ctx, arg_VA *a,
@@ -2612,6 +2612,7 @@ static bool do_va_env_helper(DisasContext *ctx, arg_VA *a,
}
TRANS_FLAGS(ALTIVEC, VMSUMUHS, do_va_env_helper, gen_helper_VMSUMUHS)
+TRANS_FLAGS(ALTIVEC, VMSUMSHS, do_va_env_helper, gen_helper_VMSUMSHS)
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23)
diff --git a/target/ppc/translate/vmx-ops.c.inc
b/target/ppc/translate/vmx-ops.c.inc
index 15b3e06410..d7cc57868e 100644
--- a/target/ppc/translate/vmx-ops.c.inc
+++ b/target/ppc/translate/vmx-ops.c.inc
@@ -224,7 +224,6 @@ GEN_VXFORM_UIMM(vctsxs, 5, 15),
#define GEN_VAFORM_PAIRED(name0, name1, opc2) \
GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC)
GEN_VAFORM_PAIRED(vmhaddshs, vmhraddshs, 16),
-GEN_VAFORM_PAIRED(vmsumshm, vmsumshs, 20),
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23),
GEN_VXFORM_DUAL(vclzb, vpopcntb, 1, 28, PPC_NONE, PPC2_ALTIVEC_207),
--
2.36.1
- [PULL 20/34] target/ppc: declare vmsum[um]bm helpers with call flags, (continued)
- [PULL 20/34] target/ppc: declare vmsum[um]bm helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 12/34] target/ppc: use TCG_CALL_NO_RWG in vector helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 14/34] target/ppc: use TCG_CALL_NO_RWG in VSX helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 16/34] target/ppc: declare xscvspdpn helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 25/34] tcg/ppc: Optimize memory ordering generation with lwsync, Daniel Henrique Barboza, 2022/05/26
- [PULL 17/34] target/ppc: declare xvxsigsp helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 18/34] target/ppc: declare xxextractuw and xxinsertw helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 21/34] target/ppc: declare vmsumuh[ms] helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 26/34] target/ppc: Implement lwsync with weaker memory ordering, Daniel Henrique Barboza, 2022/05/26
- [PULL 24/34] tcg/ppc: ST_ST memory ordering is not provided with eieio, Daniel Henrique Barboza, 2022/05/26
- [PULL 22/34] target/ppc: declare vmsumsh[ms] helper with call flags,
Daniel Henrique Barboza <=
- [PULL 23/34] target/ppc: Fix eieio memory ordering semantics, Daniel Henrique Barboza, 2022/05/26
- [PULL 27/34] target/ppc: Implement xxm[tf]acc and xxsetaccz, Daniel Henrique Barboza, 2022/05/26
- [PULL 28/34] target/ppc: Implemented xvi*ger* instructions, Daniel Henrique Barboza, 2022/05/26
- [PULL 29/34] target/ppc: Implemented pmxvi*ger* instructions, Daniel Henrique Barboza, 2022/05/26
- [PULL 30/34] target/ppc: Implemented xvf*ger*, Daniel Henrique Barboza, 2022/05/26
- [PULL 31/34] target/ppc: Implemented xvf16ger*, Daniel Henrique Barboza, 2022/05/26
- [PULL 32/34] target/ppc: Implemented pmxvf*ger*, Daniel Henrique Barboza, 2022/05/26
- [PULL 34/34] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap, Daniel Henrique Barboza, 2022/05/26
- [PULL 33/34] target/ppc: Implemented [pm]xvbf16ger2*, Daniel Henrique Barboza, 2022/05/26
- Re: [PULL 00/34] ppc queue, Richard Henderson, 2022/05/27