This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH V3, #1 of 10], Add basic pc-relative support
- From: Michael Meissner <meissner at linux dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Michael Meissner <meissner at linux dot ibm dot com>, gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 9 Sep 2019 16:28:19 -0400
- Subject: Re: [PATCH V3, #1 of 10], Add basic pc-relative support
- References: <20190826173320.GA7958@ibm-toto.the-meissners.org> <20190826195414.GA11790@ibm-toto.the-meissners.org> <20190828171458.GF31406@gate.crashing.org> <20190828212655.GA18161@ibm-toto.the-meissners.org> <20190829213207.GM31406@gate.crashing.org> <20190906001802.GA16921@ibm-toto.the-meissners.org> <20190906125051.GB9749@gate.crashing.org>
On Fri, Sep 06, 2019 at 07:50:51AM -0500, Segher Boessenkool wrote:
> On Thu, Sep 05, 2019 at 08:18:02PM -0400, Michael Meissner wrote:
> > On Thu, Aug 29, 2019 at 04:32:07PM -0500, Segher Boessenkool wrote:
> > > This is not just for reload anymore, so please don't name it that. Renaming
> > > things isn't hard, this isn't a public API or anything :-)
> > This hasn't just be for reload for several years now.
> Yes, and since you are extending it a lot now, it is high time it is fixed.
> > Do you have a name you prefer?
> As I said, I don't think all these things should be lumped together at
> all, and also you shouldn't precompute everything (as fixed values
> always, after that precompute) into arrays anyway. Instead, use
> functions for all accessors, which can have simple and clear logic what
> they return when.
> If it is hard to find good names for your interfaces, most likely your
> interfaces aren't structured very well.
Here is where I disagree. I tend to think pre-computing the stuff saves time.
When you are using it with pre-computed masks and such, it takes 5-10
instructions to make the decision, while if you have to re-do the tests (for
example, checking size, checking whether it is int/fp/vector, it can involve
many more tests than a simple load/mask type test).
But if it is the only way to get things in, I can look at not using the address
masks any further, and instead have discreet tests.
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: firstname.lastname@example.org, phone: +1 (978) 899-4797