public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matt Jacobson <mhjacobson@me.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Objective-C: fix protocol list count type (pertinent to non-LP64)
Date: Tue, 19 Oct 2021 23:51:49 -0400	[thread overview]
Message-ID: <E786AF25-3633-4935-A9A6-39DE52EF1DD4@me.com> (raw)
In-Reply-To: <3FA161CB-9D8F-4576-8607-292CE21B2BF3@me.com>


> On Sep 26, 2021, at 11:45 PM, Matt Jacobson <mhjacobson@me.com> wrote:
> 
> Fix protocol list layout for non-LP64.  clang and objc4 both give the `count` 
> field as `long`, not `intptr_t`.  Those are the same on LP64, but not 
> everywhere.  For non-LP64, this fixes binary compatibility with clang-built 
> classes.
> 
> This was more complicated than I anticipated, because the relevant frontend 
> code in fact had no AST type for `protocol_list_t`, instead emitting protocol 
> lists as `protocol_t[]`, with the zeroth element actually being the integer 
> count.  That made it nontrivial to change the count to `long`.  With this 
> change, there is now a true `protocol_list_t` type in the AST.
> 
> Tested multiple ways.  On x86_64/Darwin, I confirmed with a test program that 
> protocol conformances by classes, categories, and protocols works.  On AVR, I 
> manually inspected the generated assembly to confirm that protocol lists gain 
> an extra two bytes of `count`, matching clang.
> 
> Thank you for your time.
> 
> <https://github.com/mhjacobson/gcc/commit/5ebc95dc726f0745ebdf003093f1b8d7720ce32f>

Friendly ping.  Please let me know if there’s anything I can clarify.

Original mail:
<https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580280.html>

Thanks.

  reply	other threads:[~2021-10-20  3:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  3:45 Matt Jacobson
2021-10-20  3:51 ` Matt Jacobson [this message]
2021-10-23  8:46   ` Iain Sandoe
2021-10-25  9:43     ` Iain Sandoe
2021-11-07 22:50       ` Matt Jacobson
2021-11-08 13:41         ` Iain Sandoe

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=E786AF25-3633-4935-A9A6-39DE52EF1DD4@me.com \
    --to=mhjacobson@me.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).