[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 22/22] target/i386: reimplement (V)P(EQ,
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 22/22] target/i386: reimplement (V)P(EQ, CMP)(B, W, D) |
Date: |
Wed, 31 Jul 2019 14:31:23 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 7/31/19 1:09 PM, Aleksandar Markovic wrote:
>
>
> On Wed, Jul 31, 2019 at 9:51 PM Richard Henderson <address@hidden
> <mailto:address@hidden>> wrote:
>
> On 7/31/19 10:57 AM, Jan Bobek wrote:
> > +static inline void gen_gvec_cmpeq(unsigned vece, uint32_t dofs,
> > + uint32_t aofs, uint32_t bofs,
> > + uint32_t oprsz, uint32_t maxsz)
> > +{
> > + tcg_gen_gvec_cmp(TCG_COND_EQ, vece, dofs, aofs, bofs, oprsz,
> maxsz);
> > +}
> ...
> > +static inline void gen_gvec_cmpgt(unsigned vece, uint32_t dofs,
> > + uint32_t aofs, uint32_t bofs,
> > + uint32_t oprsz, uint32_t maxsz)
> > +{
> > + tcg_gen_gvec_cmp(TCG_COND_GT, vece, dofs, aofs, bofs, oprsz,
> maxsz);
> > +}
>
> Drop the inlines.
>
>
> Why? The compiler will decide at the end of the day, but at least "inline"
> here
> says that the code author thinks that inlining is desirable, logical, and
> expected
> in these cases, which is in turn a valuable information for the code reader.
In this case it is in fact a lie that will only confuse the reader, as it did
you. Functions whose address are passed as a callback, as these are, are
always forced out of line.
But beyond that, clang diagnoses unused static inline within *.c while gcc does
not (I'm not sure I agree with clang, but it is what it is). By leaving off
the inline, but compilers will diagnose when code rearrangement leaves a
function unused.
r~
- [Qemu-devel] [RFC PATCH v1 15/22] target/i386: reimplement (V)PADDUS(B, W), (continued)
- [Qemu-devel] [RFC PATCH v1 15/22] target/i386: reimplement (V)PADDUS(B, W), Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 17/22] target/i386: reimplement (V)PSUBUS(B, W), Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 18/22] target/i386: reimplement (V)PMINSW, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 19/22] target/i386: reimplement (V)PMINUB, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 20/22] target/i386: reimplement (V)PMAXSW, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 21/22] target/i386: reimplement (V)PMAXUB, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 16/22] target/i386: reimplement (V)PSUBS(B, W), Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 22/22] target/i386: reimplement (V)P(EQ, CMP)(B, W, D), Jan Bobek, 2019/07/31
- Re: [Qemu-devel] [RFC PATCH v1 00/22] reimplement (some) x86 vector instructions using tcg-gvec, no-reply, 2019/07/31
- Re: [Qemu-devel] [RFC PATCH v1 00/22] reimplement (some) x86 vector instructions using tcg-gvec, no-reply, 2019/07/31
- Re: [Qemu-devel] [RFC PATCH v1 00/22] reimplement (some) x86 vector instructions using tcg-gvec, no-reply, 2019/07/31