[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] target/ppc: add vmulh{su}d instructions
From: |
Richard Henderson |
Subject: |
Re: [PATCH 4/6] target/ppc: add vmulh{su}d instructions |
Date: |
Thu, 18 Jun 2020 16:32:09 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/12/20 9:20 PM, Lijun Pan wrote:
> +void helper_vmulhsd(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
> +{
> + int i;
> + uint64_t h64 = 0;
> + uint64_t l64 = 0;
> +
> + for (i = 0; i < 2; i++) {
> + muls64(&l64, &h64, a->s64[i], b->s64[i]);
> + r->s64[i] = h64;
> + }
> +}
Indentation is off.
This can just as easily be written as
uint64_t discard;
muls64(&discard, &r->u64[0], a->s64[0], b->s64[0]);
muls64(&discard, &r->u64[1], a->s64[1], b->s64[1]);
and similarly for helper_vmulhud.
r~
- [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions, Lijun Pan, 2020/06/13
- [PATCH 2/6] target/ppc: add vmulld instruction, Lijun Pan, 2020/06/13
- [PATCH 1/6] target/ppc: add byte-reverse br[dwh] instructions, Lijun Pan, 2020/06/13
- [PATCH 3/6] targetc/ppc: add vmulh{su}w instructions, Lijun Pan, 2020/06/13
- [PATCH 5/6] fix the prototype of muls64/mulu64, Lijun Pan, 2020/06/13
- [PATCH 4/6] target/ppc: add vmulh{su}d instructions, Lijun Pan, 2020/06/13
- Re: [PATCH 4/6] target/ppc: add vmulh{su}d instructions,
Richard Henderson <=
- [PATCH 6/6] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions, Lijun Pan, 2020/06/13
- Re: [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions, no-reply, 2020/06/13
- Re: [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions, Cédric Le Goater, 2020/06/15
- Re: [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions, Richard Henderson, 2020/06/18