mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
target/ppc: use int128.h methods in vsubuqm
And also move the insn to decodetree Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> Reviewed-by: Víctor Colombo <victor.colombo@eldorado.org.br> Message-Id: <20220606150037.338931-6-matheus.ferst@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
8290ea509f
commit
b132be53a4
5 changed files with 8 additions and 22 deletions
|
@ -2176,12 +2176,6 @@ VGENERIC_DO(popcntd, u64)
|
|||
|
||||
#undef VGENERIC_DO
|
||||
|
||||
#if HOST_BIG_ENDIAN
|
||||
#define QW_ONE { .u64 = { 0, 1 } }
|
||||
#else
|
||||
#define QW_ONE { .u64 = { 1, 0 } }
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_INT128
|
||||
|
||||
static inline void avr_qw_not(ppc_avr_t *t, ppc_avr_t a)
|
||||
|
@ -2245,18 +2239,9 @@ void helper_VADDECUQ(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
|
|||
r->VsrD(1) = carry_out;
|
||||
}
|
||||
|
||||
void helper_vsubuqm(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
|
||||
void helper_VSUBUQM(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
|
||||
{
|
||||
#ifdef CONFIG_INT128
|
||||
r->u128 = a->u128 - b->u128;
|
||||
#else
|
||||
ppc_avr_t tmp;
|
||||
ppc_avr_t one = QW_ONE;
|
||||
|
||||
avr_qw_not(&tmp, *b);
|
||||
avr_qw_add(&tmp, *a, tmp);
|
||||
avr_qw_add(r, tmp, one);
|
||||
#endif
|
||||
r->s128 = int128_sub(a->s128, b->s128);
|
||||
}
|
||||
|
||||
void helper_vsubeuqm(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue