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: MPS: nativecomp ABI Date: Mon, 08 Jul 2024 05:08:27 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26662"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 08 11:09:12 2024 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 1sQkMx-0006mi-JV for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Jul 2024 11:09:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQkMH-0007Hf-OV; Mon, 08 Jul 2024 05:08:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQkMF-0007HW-VV for emacs-devel@gnu.org; Mon, 08 Jul 2024 05:08:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQkMF-0001wt-NT; Mon, 08 Jul 2024 05:08:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=141BV+3KtjXEaeVcORT4rahi5vY8fqTN0O/wpIUUoKE=; b=mJ1pOVzH13ERdAa9IYiM J4qIn+Agu+DBztA1FF9yCORKWOxETqMYiUJJuNNpJMrWTBy187nKJDggggREu8M7GP3Jxwodz1hNl CJhW3ggGYM4WEmpR/s8akB1w/7NCcKg1U8Qt/p0z1eL2hx17S6twSFXNYb2JXy4c/dyDp/uyyO4Am IGOm0SkEt4ujR1uSKbUkVzmcBV4PySqTjwmYbWfcgROwnLsfdXcrS8AbFNvNTj6eHSiLvgEWYfAPV aOXkq33joA2y8bM5OAFnZ/3KwC0Ruipw6Oqi3l/2fNs5khoQwALqDduUtBaSL7EqmukoKcZTQBYVE SCDzHEV0hrC9Rg==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sQkMF-00027Z-FS; Mon, 08 Jul 2024 05:08:27 -0400 In-Reply-To: (Pip Cet's message of "Sun, 07 Jul 2024 19:11:55 +0000") 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321527 Archived-At: Pip Cet writes: > On Saturday, July 6th, 2024 at 17:53, Andrea Corallo wrote: >> Pip Cet pipcet@protonmail.com writes: >> > I'm working on scratch/igc. One thing I'd like to do is put the IGC header which all objects will require (for now) into these structs: >> > >> > struct Lisp_Cons >> > struct Lisp_Symbol >> > struct Lisp_String >> > struct Lisp_Float >> > union vectorlike_header >> > >> > IIUC, this means changing the nativecomp ABI hash (which means I'll >> > have to rebuild the .eln files, I think) and adjusting any nativecomp >> > code which knows about the structure layouts. However, I've only been >> > able to find that for Lisp_Cons and struct Lisp_Symbol_With_Pos, which >> > declares its header as ptrdiff_t. Are there more, or do the others all >> > use C functions for access? >> > >> > Things appear to work, but I'd rather not miss anything and haven't looked at this code in years. >> > >> > Thanks! >> > Pip > >> I believe the easiest is that you compile a .eln with >> native-comp-debug >= 2 and have a look to the generated pseudo C. >> > >> Indipendently to the code being compiled, on top you'll see all the >> structures defined to libgccjit. > > Thanks for the advice. That worked for me, though I must confess I was looking in the wrong place for the pseudo-C code. Right I improved the doc to make it clear where to find it. Andrea