[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: |
Tue, 04 Oct 2022 18:39:33 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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.
>> >
>>
>> Are this and the following new line added voluntarily?
>>
>
> Oops, fixed.
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.
Thanks for your work.
Bests
Andrea