From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64151 invoked by alias); 15 Jul 2015 18:22:21 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 64139 invoked by uid 89); 15 Jul 2015 18:22:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.7 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: ovh.starynkevitch.net Message-ID: <55A6A4D4.9070908@starynkevitch.net> Date: Thu, 01 Jan 2015 00:00:00 -0000 From: Basile Starynkevitch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: David Malcolm CC: jit@gcc.gnu.org Subject: Re: missing gcc_jit_context_new_rvalue_from_long_long etc....? References: <20150715082516.GA27799@ovh.starynkevitch.net> <1436972619.830.28.camel@surprise> In-Reply-To: <1436972619.830.28.camel@surprise> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-q3/txt/msg00088.txt.bz2 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 ?). >> >> 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: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***