[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 8/8] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instruction
From: |
David Gibson |
Subject: |
Re: [PATCH v3 8/8] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions |
Date: |
Fri, 26 Jun 2020 14:31:14 +1000 |
On Thu, Jun 25, 2020 at 08:53:54PM -0700, Richard Henderson wrote:
> On 6/25/20 2:15 PM, Lijun Pan wrote:
> >
> >
> >> On Jun 25, 2020, at 1:37 PM, Richard Henderson
> >> <richard.henderson@linaro.org> wrote:
> >>
> >> On 6/25/20 10:00 AM, Lijun Pan wrote:
> >>> +#define VDIV_MOD_DO(name, op, element, sign, bit) \
> >>> + void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \
> >>> + { \
> >>> + int i; \
> >>> + \
> >>> + \
> >>> + for (i = 0; i < ARRAY_SIZE(r->element); i++) { \
> >>> + if (unlikely((b->element[i] == 0) || \
> >>> + (sign && \
> >>> + (b->element[i] == UINT##bit##_MAX) && \
> >>> + (a->element[i] == INT##bit##_MIN)))) \
> >>> + continue; \
> >>> + r->element[i] = a->element[i] op b->element[i]; \
> >>> + } \
> >>> + }
> >>
> >> Missing braces for the if. Extra blank line before the for.
> >
> > No, the braces are enough.
>
> No they are not. See CODING_STYLE.rst.
I suspect there is some confusion in terms here.
Lijun, what Richard is saying is that the qemu coding style requires
braces { } around if blocks, even if they're a single statement. Your
response seemed to be discussing the brackets ( ) which are fine.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
[PATCH v3 7/8] target/ppc: add vmulh{su}d instructions, Lijun Pan, 2020/06/25