public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marc Nieper-Wißkirchen" <marc.nieper@gmail.com>
To: Antoni Boucher <bouanto@zoho.com>,
	David Malcolm <dmalcolm@redhat.com>,
	Petter Tomner <tomner@kth.se>
Cc: "Marc Nieper-Wißkirchen via Jit" <jit@gcc.gnu.org>
Subject: Re: [PATCH] libgccjit: Add support for setting the alignment [PR104293]
Date: Sat, 16 Apr 2022 22:26:09 +0200	[thread overview]
Message-ID: <CAEYrNrSHp75ZMw8C=i07dG6=bXSVfenp6j6W2bpWOAw_LYViaA@mail.gmail.com> (raw)
In-Reply-To: <8BB230BB-AC78-4B79-8B01-44714A53B8DF@gmail.com>

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 <jit@gcc.gnu.org>:
>
> On 12 April 2022 23:51:34 CEST, David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> 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,

  reply	other threads:[~2022-04-16 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31  1:38 Antoni Boucher
2022-04-08 19:01 ` David Malcolm
2022-04-09 17:50   ` Antoni Boucher
2022-04-12 21:51     ` David Malcolm
2022-04-13 11:47       ` Bernhard Reutner-Fischer
2022-04-16 20:26         ` Marc Nieper-Wißkirchen [this message]
2022-04-17  2:28           ` Antoni Boucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEYrNrSHp75ZMw8C=i07dG6=bXSVfenp6j6W2bpWOAw_LYViaA@mail.gmail.com' \
    --to=marc.nieper@gmail.com \
    --cc=bouanto@zoho.com \
    --cc=dmalcolm@redhat.com \
    --cc=jit@gcc.gnu.org \
    --cc=tomner@kth.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).