public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Cary Coutant <ccoutant@gmail.com>
To: Michael Matz <matz@suse.de>
Cc: x86-64-abi <x86-64-abi@googlegroups.com>,
	Binutils <binutils@sourceware.org>,
		Jim Dehnert <dehnert@gmail.com>
Subject: Re: OR_AND semantics (was: GNU property saga)
Date: Thu, 07 Mar 2019 06:56:00 -0000	[thread overview]
Message-ID: <CAJimCsFD1g=JkfCgYcRmhBASj_zBELL66_ZJgAnPNAJkL7WWNw@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.21.1903061340460.5354@wotan.suse.de>

> > I was trying to understand why HJ didn't care about case (b) -- if a
> > feature is used by at least one object, what difference does it make
> > whether we have some objects that didn't say whether they used the
> > feature? I believe his answer is that the use case for these
> > properties is to allow the OS to decide whether it can allocate a
> > program to a downgraded processor, based on whether we know for sure
> > that the program does *not* use a particular feature. Thus, case (c)
> > is the important one where the downgrade is feasible, and all other
> > cases mean that it is not (either because we know the feature is used,
> > or because we do not know it's not used).
>
> That might be, but truth be told, I'm more comfortable with an orthogonal
> design that can express more than we need right now, than with a design
> where two concepts (known and used) are merged in a non-natural way.

Agreed.

> HJ: what's your issue with the KNOWN+USED approach?  I would envision an
> encoding where e.g. even IDs encode the 32 KNOWN bits, and odd IDs encode
> the 32 USED bits.  Optionally we could retain the differentiation between
> OR vs. AND for the logical combination of the USED bits (where the KNOWN
> bits are always ANDed), though I'm not sure I would see the point for
> this.

There are other properties that need AND: ones where the OS depends on
the program supporting something, like IBT and SHSTK, rather than the
program depending on a feature supported by OS or CPU. So they
wouldn't always be paired as KNOWN/USED, there would also be some AND
properties standing on their own. In addition, if we want NEEDED
features in addition to USED features, they could form a triplet:
KNOWN/USED/NEEDED. Still, I think using the even/odd bit as an
indication whether we need to OR or AND is reasonable (kind of like
how we use that bit to indicate what kind of tag is used for DT
entries). If we can eliminate the need for the OR_AND beast, I think
we could assert that the only combining methods we need are OR and
AND.

(I went back and looked at one of HJ's early proposals for properties,
and the even/odd bit is the approach he originally took.)

> I really have stomach aches with the current design of the properties.

As you can tell from my posts on this topic, I agree strongly enough
to have tilted at this windmill far longer than I normally would have.
Thanks for chiming in!

-cary

  reply	other threads:[~2019-03-07  6:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 17:25 GNU property saga Michael Matz
2019-03-04 17:40 ` OR_AND semantics (was: GNU property saga) Michael Matz
2019-03-05  0:48   ` Cary Coutant
2019-03-06 13:57     ` Michael Matz
2019-03-07  6:56       ` Cary Coutant [this message]
2019-03-08  3:44   ` H.J. Lu
2019-03-08  6:06     ` Cary Coutant
2019-03-08  6:25       ` Jim Dehnert
2019-03-11  7:34         ` H.J. Lu
2019-03-20 14:51 ` GNU property saga Mark Wielaard
     [not found]   ` <25adbffa-fc4c-1b01-7949-fbe0dc212f70@arm.com>
2019-05-10 18:37     ` Mark Wielaard

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='CAJimCsFD1g=JkfCgYcRmhBASj_zBELL66_ZJgAnPNAJkL7WWNw@mail.gmail.com' \
    --to=ccoutant@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=dehnert@gmail.com \
    --cc=matz@suse.de \
    --cc=x86-64-abi@googlegroups.com \
    /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).