From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel 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 Message-ID: References: <359f42c0c165c4b00c84a7818a89697e7cd28d50.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1894"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Vibhav Pant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 05 12:43:59 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1og1sc-0000Gj-QC for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 12:43:58 +0200 Original-Received: from localhost ([::1]:33664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og1sb-00027R-Is for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 06:43:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og1rW-0001RL-A9 for emacs-devel@gnu.org; Wed, 05 Oct 2022 06:42:51 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:58037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og1rU-0001ci-06 for emacs-devel@gnu.org; Wed, 05 Oct 2022 06:42:50 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 295AghpT027701 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 5 Oct 2022 10:42:43 GMT In-Reply-To: (Vibhav Pant's message of "Wed, 05 Oct 2022 14:51:46 +0530") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296951 Archived-At: Vibhav Pant writes: > On Tue, 2022-10-04 at 18:39 +0000, Andrea Corallo wrote: >> Vibhav Pant writes: >>=20 >> > On Wed, 2022-09-28 at 12:37 +0000, Andrea Corallo wrote: >> > > thanks for the patch, please find some comments below. >> > Hi Andrea, >> >=20 >> > Thanks for the feedback. >> >=20 >> > >=20 >> > > Could you clarify why we need this double cast in both cases >> > > here? >> > >=20 >> >=20 >> > 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. >>=20 >> I see thanks, I'd like to have a comment recording this in the code. >>=20 > Good idea, done. > >> > >=20 >> The patch is okay for me with the suggestions implemented.=C2=A0 I assume >> you >> have write access, if is not the case just post the patch here and >> I'll >> install it. >>=20 > 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