Hi!

On Thu, Jul 30, 2020 at 04:35:57AM -0400, David Edelsohn wrote:
> The purpose should not be to exclude AIX.  If there is no fundamental
> limitation with use of the new tablejump design on AIX then the patch
> is not acceptable without AIX support.

The patch should work on all subtargets.  It will be controlled by an
(undocumented?) command line option, for easy experimentation, and to
make it easy to (temporarily) disable it for some subtarget.

This change will probably cause some problems on different OSes and with
different binary file formats, so it is useful to be able to control the
default separately for each, to keep things working while we figure
things out.  (It is not just AIX and Darwin, but also 32-bit Linux, the
several BSDs (which are different), bare-metal ports, the embedded OSes,
etc.)

But the goal is for this to work everywhere, yes.

We could default it to non-relative, to see what breaks ;-)

> The patch should use DOUBLE_INT_ASM_OP, not explicit ".quad".  AIX
> always is PIC.  It's not obvious to me why the patch should limit
> support to PPC64 Linux.

It's the only thing that was tested so far (I'm not sure if BE was
tested even there?)

> The section selection seems Linux/ELF
> specific, but the rest seems like a general design optimization for
> all PowerPC-based operating systems.

Yup, needs some work.


This patch should be split into the core piece, which creates the flag
and adds infrastructure etc., and patches for the subtarget-specific
pieces.  It is likely that different subtargets will want to choose
different sections for the jump tables?  But the basic things can work
everywhere, in principle.


Segher

Reply via email to