[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] comp.c: Use the newly added bitcast API for type coercion, w
From: |
Andrea Corallo |
Subject: |
Re: [PATCH] comp.c: Use the newly added bitcast API for type coercion, when available. (feature/jit-improved-type-punning) |
Date: |
Wed, 05 Oct 2022 10:42:43 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Vibhav Pant <vibhavp@gmail.com> writes:
> On Tue, 2022-10-04 at 18:39 +0000, Andrea Corallo wrote:
>> Vibhav Pant <vibhavp@gmail.com> writes:
>>
>> > On Wed, 2022-09-28 at 12:37 +0000, Andrea Corallo wrote:
>> > > thanks for the patch, please find some comments below.
>> > Hi Andrea,
>> >
>> > Thanks for the feedback.
>> >
>> > >
>> > > Could you clarify why we need this double cast in both cases
>> > > here?
>> > >
>> >
>> > gcc_jit_context_new_bitcast requires that the types being converted
>> > between have the same layout and as such, doesn't allow converting
>> > between an arbitrarily sized integer/boolean and a pointer. Casting
>> > it
>> > to a uintptr/void* is still necessary, to ensure that it can be
>> > bitcast
>> > into a void*/uintptr respectively.
>>
>> I see thanks, I'd like to have a comment recording this in the code.
>>
> Good idea, done.
>
>> > >
>> The patch is okay for me with the suggestions implemented. I assume
>> you
>> have write access, if is not the case just post the patch here and
>> I'll
>> install it.
>>
> Sure, I merged the branch last night. Thanks for the help.
Thanks, next time please squash the requested changes in the original
change before pushing it.
Best Regards
Andrea