From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 261083857C41 for ; Fri, 24 Jul 2020 22:12:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 261083857C41 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-D66gsQalMgiOvBqv4_c2pw-1; Fri, 24 Jul 2020 18:12:24 -0400 X-MC-Unique: D66gsQalMgiOvBqv4_c2pw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EF90107BEF6; Fri, 24 Jul 2020 22:12:23 +0000 (UTC) Received: from ovpn-113-239.phx2.redhat.com (ovpn-113-239.phx2.redhat.com [10.3.113.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF85F70107; Fri, 24 Jul 2020 22:12:22 +0000 (UTC) Message-ID: <22479e6a6a1e27df07a3d2c2cfb8c6c8420a7d3d.camel@redhat.com> Subject: Re: [PATCH] libgccjit: Add new gcc_jit_context_new_blob entry point From: David Malcolm To: Andrea Corallo Cc: jit@gcc.gnu.org, nd@arm.com, gcc-patches@gcc.gnu.org Date: Fri, 24 Jul 2020 18:12:22 -0400 In-Reply-To: <93e3d65a0b04b13a5d5c9970a2058d167357ed6c.camel@redhat.com> References: <59a8d345c642d49281a601278946e087a4bbe3e2.camel@redhat.com> <87zh9kumwi.fsf@arm.com> <93e3d65a0b04b13a5d5c9970a2058d167357ed6c.camel@redhat.com> User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2020 22:12:28 -0000 On Fri, 2020-07-24 at 18:05 -0400, David Malcolm via Gcc-patches wrote: [...] > I haven't thought this through in detail, and I'm not sure exactly > how > it would work for arbitrary types, but I thought it worth sharing. > (For example I can think of nasty issues if we ever want to support > cross-compilation, e.g. where sizeof types or endianness differs > between host and target). ...which is an argument in favor of retaining the name "blob", perhaps as the name of the argument in the header file e.g.: extern void gcc_jit_global_set_initializer (gcc_jit_lvalue *global, const void *blob, size_t num_bytes); as a subtle hint to the user that they need to be wary about binary layouts ("here be dragons"). [...]