From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by sourceware.org (Postfix) with ESMTPS id 98E1F385843E for ; Sat, 16 Apr 2022 20:26:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98E1F385843E Received: by mail-yb1-xb35.google.com with SMTP id f17so19669402ybj.10 for ; Sat, 16 Apr 2022 13:26:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xG2XlLk8qqTSHWnd5/cE+lY1P3ygjwiozUIgA/ZBPEI=; b=LxyNRwU4uxwpbq88GhKdNN/dRHDF1ftQdO5/+JsN67Kk1K4KyrXta9hFpE9VIACBi4 7nV7nX2LI8O6hQNzyjsRoSUx2vyga5szRBJ2NeimfQ7MA9TYfcUWuz2lbHuIdIdiSpAf /OhGB9PCHxDQb2vEm3k1Cwa/idrtD2NJGLtNipJzwEfyE5futptXQVpUtuydO3D9LgPI Wne6NVIqnpeadzRgh2yAAmg0/RdvTOwn69zJ1TdI11drg7ap7NMtv3y7ifOSTb74vNrf 2LeF58Iz7dkbP6rq2dOINOdXg/kHS8FGWw+2/fJCx/I7XxP+mbVN/iygrBP9gv72+Sft nTag== X-Gm-Message-State: AOAM533Jaq1yPO0c9PJdo9UT9TPicrBJf01x0PRZLg8Shwhr/oGdHrfT cqZxR0fJXdCJte1pYY1t+tQWqlhVbIgCy9mELkM= X-Google-Smtp-Source: ABdhPJzsqkjIk2YxcpmyBocLvYSpdr2153dXyZP25MXTYbthET8w5YqxiPVCbYpT9n9XpUJJrmdK5vBpYLD/5xCi+co= X-Received: by 2002:a25:ca87:0:b0:641:e72:6037 with SMTP id a129-20020a25ca87000000b006410e726037mr4029099ybg.438.1650140781013; Sat, 16 Apr 2022 13:26:21 -0700 (PDT) MIME-Version: 1.0 References: <7f32bff12738484e3f5d97cfc481996fd7570b01.camel@zoho.com> <1a077e6549786d9aedb1cf353f176b0207520c6e.camel@redhat.com> <7c11cc644be07afa0753dbabc2fb607c8af48af6.camel@zoho.com> <0daad6110a15a9aab4e924c415405547248cd873.camel@redhat.com> <8BB230BB-AC78-4B79-8B01-44714A53B8DF@gmail.com> In-Reply-To: <8BB230BB-AC78-4B79-8B01-44714A53B8DF@gmail.com> From: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen?= Date: Sat, 16 Apr 2022 22:26:09 +0200 Message-ID: Subject: Re: [PATCH] libgccjit: Add support for setting the alignment [PR104293] To: Antoni Boucher , David Malcolm , Petter Tomner Cc: =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkirchen_via_Jit?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Sat, 16 Apr 2022 20:26:23 -0000 I haven't checked the cause of the bug reported here [1]. It may either be in the struct constructor code or in the new code for alignments, so this email goes to both Antoni and Petter. Speaking of struct constructors, I have found another bug [2] Thanks, Marc -- [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105296 [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105286 Am Mi., 13. Apr. 2022 um 13:47 Uhr schrieb Bernhard Reutner-Fischer via Jit : > > On 12 April 2022 23:51:34 CEST, David Malcolm via Gcc-patches wrote: > >On Sat, 2022-04-09 at 13:50 -0400, Antoni Boucher wrote: > >> Here's the updated patch. > >> > > >I've pushed the patch to trunk for GCC 12 as r12-8120-g6e5ad1cc24a315. > > > >https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6e5ad1cc24a315d07f24c95d76c269cafe2a8182 > > > >> > > + in C, but in bits instead of bytes. > >> > > >> > If we're doing it in bytes, this will need updating, of course. > >> > > >> > Maybe rename the int param from "alignment" to "bytes" to make this > >> > clearer. > >> > > >> > Probably should be unsigned as well. > > >> > > +void > >> > > +gcc_jit_lvalue_set_alignment (gcc_jit_lvalue *lvalue, > >> > > + int alignment) > >> > > +{ > >> > > + RETURN_IF_FAIL (lvalue, NULL, NULL, "NULL lvalue"); > >> > > >> > Should the alignment be unsigned? What if the user passes in > >> > negative? > >> > > >> > Does it have to be a power of two? If so, ideally we should reject > >> > non-power-of-two here. > > The wrapper was changed to unsigned bytes. > set_alignment still takes int bytes AFAICS? > > Now I think there are or may be machine dependent max alignment, aren't there? If there are, they are enforced later in the pipeline I assume? > > thanks,