Hi!

On Thu, Jan 09, 2020 at 07:40:08PM -0500, Michael Meissner wrote:
>       * config/rs6000/linux64.h (PREFIXED_ADDR_SUPPORTED_BY_OS): Set to
>       1 to enable prefixed addressing if -mcpu=future.
>       (PCREL_SUPPORTED_BY_OS): Set to 1 to enable PC-relative addressing
>       if -mcpu=future.
>       * config/rs6000/rs6000-cpus.h (ISA_FUTURE_MASKS_SERVER): Do not
>       enable -mprefixed-addr or -mpcrel by default.

I understand why this is needed for pcrel (or useful at least), but why
for prefixed addressing in general as well?  What OS support is needed
for that?

Put another way, is this just carefulness, or do you run into actual
problems without it?

> +/* Enable support for pc-relative and numeric prefixed addressing on the
> +   'future' system.  */
> +#undef  PREFIXED_ADDR_SUPPORTED_BY_OS
> +#define PREFIXED_ADDR_SUPPORTED_BY_OS        1
> +
> +#undef  PCREL_SUPPORTED_BY_OS
> +#define PCREL_SUPPORTED_BY_OS                1

"Numeric prefixed addressing"?  What's that?  Just "and other prefixed
addressing", maybe?

(Is it useful to have those two separate at all, btw?  Now, that is while
we are still developing the code, but also in the future?)

> +/* Addressing related flags on a future processor.  These are options that 
> need
> +   to be cleared if the target OS is not capable of supporting prefixed
> +   addressing at all (such as 32-bit mode or if the object file format is not
> +   ELF v2).  */

Ah.  If we are missing the needed relocations (or other as/ld support).
So it is not about OS really, missing toolchain support instead?

> +      /* Only ELFv2 currently supports prefixed/pcrel addressing.  */
> +      else if (rs6000_current_abi != ABI_ELFv2)
> +     {
> +       if (TARGET_PCREL && explicit_pcrel)
> +         error ("%qs requires %qs", "-mpcrel", "-mabi=elfv2");
> +
> +       else if (TARGET_PREFIXED_ADDR && explicit_prefixed)
> +         error ("%qs requires %qs", "-mprefixed-addr", "-mabi=elfv2");

It would be good if the error messages also said "currently" somehow (it
is not an actual limitation, it's just a matter of code).  "Is only
supported with -mabi=elfv2", perhaps?


Segher

Reply via email to