t;>> Cheers,
>>> Jason
>>>
>>> On Fri, Sep 18, 2020 at 8:29 AM Gutierrez, Anthony <
>>> anthony.gutier...@amd.com> wrote:
>>>
>>>> [AMD Public Use]
>>>>
>>>>
>>>>
>>>> Hey, Jason per
gt;
>>>
>>>
>>> Hey, Jason perhaps you mentioned this somewhere but what is the reason
>>> for such a strong aversion to the template approach? It seems to solve the
>>> issue nicely with what seems to be a minor change in syntax. gem5 is C++,
>>
s to be a minor change in syntax. gem5 is C++,
>> so we should allow users to write C++.
>>
>>
>>
>> Tony
>>
>>
>>
>> *From:* Jason Lowe-Power via gem5-dev
>> *Sent:* Friday, September 18, 2020 8:05 AM
>> *To:* Gabe Black
>>
Lowe-Power via gem5-dev
> *Sent:* Friday, September 18, 2020 8:05 AM
> *To:* Gabe Black
> *Cc:* gem5 Developer List ; Jason Lowe-Power <
> ja...@lowepower.com>
> *Subject:* [gem5-dev] Re: A few quick thoughts
>
>
>
> [CAUTION: External Email]
>
> There is
Lowe-Power via gem5-dev
Sent: Friday, September 18, 2020 8:05 AM
To: Gabe Black
Cc: gem5 Developer List ; Jason Lowe-Power
Subject: [gem5-dev] Re: A few quick thoughts
[CAUTION: External Email]
There is another option to keep the function-like syntax, but get the constexpr
via templates
There is another option to keep the function-like syntax, but get the
constexpr via templates: A preprocessor macro:
#define bits(val, first, last) bits(val)
The major downside is that we can't overload preprocessor macros. We'd have
to have two name bits_const() and bits(), which I also don't
I spent some more time digging into 2, and while I didn't find anything
that directly stated that you aren't allowed to do that, without explicit
support I think it flies in the face of how C++ templates, types, etc. work
to the point where if you *did* find a way to do it, it would almost
On Thu, Sep 17, 2020 at 2:48 PM Gabe Black via gem5-dev
wrote:
> 1. Sounds good, I'll hopefully have some time to put together a CL in no
> too long (weekend?).
>
> 2. I 5ries to figure out a way to do it without the template that wasn't
> really gross a somewhat fragile and wasn't able to, but
1. Sounds good, I'll hopefully have some time to put together a CL in no
too long (weekend?).
2. I 5ries to figure out a way to do it without the template that wasn't
really gross a somewhat fragile and wasn't able to, but that would
definitely be preferable. I'll keep thinking about it, but the
1) Seems fine to me.
2) I remember looking into this and I agree with Jason, it involves
template magic which I'm not a huge fan of. I feel like in order to add
these compile time asserts we'd be sacrificing some
readability/ease-of-usability of bitfields.hh. This may just be a "me
thing", but
Hey Gabe,
On Thu, Sep 17, 2020 at 4:46 AM Gabe Black via gem5-dev
wrote:
> 1. Use __builtin_expect() for panic, fatal, etc. Preexisting library
> functions like assert probably already have this, but our versions don't
> and have similar behavior patterns. This should improve performance.
>
11 matches
Mail list logo