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: Sat, 06 Jul 2024 13:53:43 -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="38886"; 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 Sat Jul 06 19:54:42 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 1sQ9cQ-0009t6-1A for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 19:54:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ9bc-0003QN-KG; Sat, 06 Jul 2024 13:53:52 -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 1sQ9bb-0003QA-53 for emacs-devel@gnu.org; Sat, 06 Jul 2024 13:53:51 -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 1sQ9ba-0008D6-Sx; Sat, 06 Jul 2024 13:53:50 -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=lpvdx/abYd0lSMX2msoJIC4Ywlbxhvf+ndozsNCtUTA=; b=kwuCZNIgSUDme9pIYUn8 6f9NCxuVV9dtOguxrGrLW/s28kOiH9E6fQ+2o+bRzpdImWQKE4l+e+f/bIgMBMdJ+GnSnO4KZftb5 upDhgwrFzjgfyciekQktLcusRZt+6/JTghgPrdJ+2Ep6DrYTK7eQXkty2ZqR6uyHkdkotN9kDGGnB Jd2r9E+j8wBRuGyfWzTWYJcpQ1/Dbrkog/ahMN50gLzXshtMJDF4P7jSvOcpdFH3io6qgn5P6Payq vHzhVq53Sak9ZPDN6OwsyZzG4SHBAdmQcfKkuXA0nodf7DGyl9TyFB12tdQMh3XGsoUtNCiByuJLY 5yTW5VYNDDskzQ==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sQ9bT-0003Bh-K5; Sat, 06 Jul 2024 13:53:50 -0400 In-Reply-To: (Pip Cet's message of "Fri, 05 Jul 2024 14:44:16 +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:321455 Archived-At: Pip Cet writes: > Hello, > > 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 Hello, 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. I'll not have access to a machine where I can do it before next week but this is the easiest way to aswer your question. Andrea