missing gcc_jit_context_new_rvalue_from_long_long etc....?

Basile Starynkevitch basile@starynkevitch.net
Thu Jan 1 00:00:00 GMT 2015


On 07/15/2015 17:03, David Malcolm wrote:
> On Wed, 2015-07-15 at 10:25 +0200, Basile Starynkevitch wrote:
>> Hello all,
>>
>> It looks like we are missing functions to create various rvalues from
>> various numerical types, e.g.
>>
>>     gcc_jit_rvalue *
>>     gcc_jit_context_new_rvalue_from_long_long(gcc_jit_context *ctxt,
>>                                               gcc_jit_type *numeric_type,
>>                                               
>>     gcc_jit_rvalue *
>>     gcc_jit_context_new_rvalue_from_int64(gcc_jit_context *ctxt,
>>                                               gcc_jit_type *numeric_type,
>>                                               int64_t value);
>>
>>     gcc_jit_rvalue *
>>     gcc_jit_context_new_rvalue_from_uint64(gcc_jit_context *ctxt,
>>                                               gcc_jit_type *numeric_type,
>>                                               uint64_t value);
>>
>>
>>     gcc_jit_rvalue *
>>     gcc_jit_context_new_rvalue_from_long_double(gcc_jit_context *ctxt,
>>                                               gcc_jit_type *numeric_type,
>>                                               long double value);
>>
>> and many more (int128_t & intptr_t perhaps, and all the types defined
>> by the C99 standard in <stdint.h>?).
>>
>> On x86-64/Linux this does not matters much, because `long` are 64 bits already.
>> On some 32 bits architecture (ia32 a.k.a. 32 bits x86, or ARM) it might matter more.
> If this is an issue, it's fixable; internally the library uses templates
> to represent the different host types.
>
> See r219401 (aka git commit feea5a1ffb846e07cc669e37fbb89991114bc589)
> for the relevant patch.


I just submitted the patch 
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01315.html for that.

Cheers.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***



More information about the Jit mailing list