From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vibhav Pant 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 14:51:46 +0530 Message-ID: References: <359f42c0c165c4b00c84a7818a89697e7cd28d50.camel@gmail.com> Reply-To: vibhavp@gmail.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-I5wkbhY0ur4DLgk6eQ3x" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13942"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.44.4 Cc: emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 05 11:24:21 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 1og0dZ-0003W9-CO for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 11:24:21 +0200 Original-Received: from localhost ([::1]:41794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og0dY-0002me-Bi for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 05:24:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og0bH-0001nb-Pu for emacs-devel@gnu.org; Wed, 05 Oct 2022 05:22:07 -0400 Original-Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:44950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1og0bB-0003jQ-Sz for emacs-devel@gnu.org; Wed, 05 Oct 2022 05:21:56 -0400 Original-Received: by mail-pj1-x1030.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so377624pjl.3 for ; Wed, 05 Oct 2022 02:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:references:in-reply-to:date:cc:to:reply-to :from:subject:message-id:from:to:cc:subject:date; bh=H5ZLrDN8RMU+lPCnYxD4MV/zBj0v3wKTk+S7Ebf4594=; b=gF1TWmsCZ4jcbBrhA06ujHf+nekqP7O6T1wu+46LXGE0Q6ePKitOsHwH68YUIX2RTa uJV5ag7KEWAT8PQANp5I2x09+rirfxJTlcBVOxpyX+haZkYqoOwqUrT2e2JEtFr/eagw UKQ5NHM+LWF0KPwxD3Li/ViKhHspcpANsqPCUXHJgwX427RCvL+z4jZ11l1QXi+jbP5w C0xN0Z7C5TKGYr6w1tZ9cpXdKa0IEcSRk2Adic4D/jQXergYxWnMQStwWbnMmfkqiRTu Z5ZxzSUS1SZenXlN81dxzKQ8iDKYsHSRJcJw+8dEruQ6JoL72/ExQ59NSwLmuswX9Swl 0cgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:references:in-reply-to:date:cc:to:reply-to :from:subject:message-id:x-gm-message-state:from:to:cc:subject:date; bh=H5ZLrDN8RMU+lPCnYxD4MV/zBj0v3wKTk+S7Ebf4594=; b=A2xXfhn1BYmqQWioV3rh2ZY1fd17FhHaYOwRaXbAOQ+cCGB0h//QRi5vUxUkWLahsx Z3DQc4HluLApykQ0uv+CqtwvRwBUAGNOCkXde3yXhqYtYiPt7O8/wWnOeHwBkTcBVdo7 ybb/9SrUT2YEZQ8ZFi7vJiyHcpJbejVY3natkK6XVabpJxWeC3FK75mXlain9XFDmYUE 6uiO8wvJBjoqQRYtfopIYXLgtAiBNfoAK5C4GbncdPgHKxGzBJLZWZpXC+MlO8C5GHkX f9559BrqNfNuqs/fV3bC/AhwAqLVPwOkOf7f4uymWVvoRf/bqkHlVUAk9k6ayhsICFNE v8FQ== X-Gm-Message-State: ACrzQf3gI/oRLn1qTHOSMsXkkLSP5PNTL8QEgmb0hJtW/cB2gkAmgLxe 3OvIT/2BDRjra15oLDFvLsM= X-Google-Smtp-Source: AMsMyM7CxmH9kOyDEn7asYhTkg4/+u2F7kKu5ov1cey2bqqQDhsJTgLqCArX+2aerZd3gvo5oMPvuA== X-Received: by 2002:a17:902:a707:b0:178:bd1e:e8be with SMTP id w7-20020a170902a70700b00178bd1ee8bemr31163780plq.167.1664961711474; Wed, 05 Oct 2022 02:21:51 -0700 (PDT) Original-Received: from ?IPv6:2401:4900:1f35:dbd5:3f2d:7d72:77ec:5e3d? ([2401:4900:1f35:dbd5:3f2d:7d72:77ec:5e3d]) by smtp.gmail.com with ESMTPSA id h6-20020a170902680600b001782a0d3eeasm1884008plk.115.2022.10.05.02.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 02:21:50 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=vibhavp@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:296949 Archived-At: --=-I5wkbhY0ur4DLgk6eQ3x Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. Best, Vibhav --=20 Vibhav Pant vibhavp@gmail.com GPG: 7ED1 D48C 513C A024 BE3A 785F E3FB 28CB 6AB5 9598 --=-I5wkbhY0ur4DLgk6eQ3x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEftHUjFE8oCS+Onhf4/soy2q1lZgFAmM9TKoACgkQ4/soy2q1 lZg8NQf9Gs5P2h/0LksJk8zVzhkPxnpUEBK6mUtwP8gWtldFKSmhZo8lMDr63PdL yVFzLgsxBrI/vyL9zDUcdoavYPGDxOIlA7fSTrk5azLLjLNfocz/5t1YT2/dpcsJ pK9RgxukH6KA7xagIlONxktq+58FxBLWw1PliV2w5FBvwm/Btk5DhBPOzUgdvOSN MVjjdontVknW9X4cTHIpKuMQLflCudYRKzwXiaAJ8Ok+H7roTKmrG6ATWk94kiWN 2Or7rji87kLm6TTzHrOT1NnxUodIUiIgXnJixgkHGUU7D8X+9Zw/oK7mEd0g/RkI b6ln0kiPfY/Rkfzfgo5dfe13nbFdcw== =aK+c -----END PGP SIGNATURE----- --=-I5wkbhY0ur4DLgk6eQ3x--