[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeDMkhJCvCa44lBM@smile.fi.intel.com>
Date: Thu, 29 Feb 2024 20:27:30 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Lucas De Marchi <lucas.demarchi@...el.com>
Cc: Yury Norov <yury.norov@...il.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Jani Nikula <jani.nikula@...ux.intel.com>,
intel-xe@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
Jani Nikula <jani.nikula@...el.com>
Subject: Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks
On Thu, Feb 29, 2024 at 12:21:34PM -0600, Lucas De Marchi wrote:
> On Thu, Feb 29, 2024 at 12:49:57PM +0200, Andy Shevchenko wrote:
> > On Wed, Feb 28, 2024 at 05:39:21PM -0600, Lucas De Marchi wrote:
> > > On Thu, Feb 22, 2024 at 06:49:59AM -0800, Yury Norov wrote:
..
> > > I build-tested this in x86-64, x86-32 and arm64. I didn't like much the
> > > need to fork the __GENMASK() implementation on the 2 sides of the ifdef
> > > since I think the GENMASK_INPUT_CHECK() should be the one covering the
> > > input checks. However to make it common we'd need to solve 2 problems:
> > > the casts and the sizeof. The sizeof can be passed as arg to
> > > __GENMASK(), however the casts I think would need a __CAST_U8(x)
> > > or the like and sprinkle it everywhere, which would hurt readability.
> > > Not pretty. Or go back to the original submission and make it less
> > > horrible :-/
> >
> > I'm wondering if we can use _Generic() approach here.
>
> in assembly?
Yes.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists