This patch attempts to restrict the following P10 options:
-mprefixed -mpcrel -mpaired-vector-memops
To P10 only. This will prevent the use of these options on P9 and earlier.
The behaviour of this patch looks like the following on pre-P10:
$ clang -mcpu=pwr9 -mpaired-vector-memops test.c -o test error: option '-mpaired-vector-memops' cannot be specified without '-mcpu=pwr10' $ clang -mcpu=pwr9 -mprefixed test.c -o test error: option '-mprefixed' cannot be specified without '-mcpu=pwr10' $ clang -mcpu=pwr9 -mprefixed -mpcrel test.c -o test error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed' $ clang -mcpu=pwr9 -mpcrel -mprefixed test.c -o test error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed' $ clang -mcpu=pwr9 -mpcrel test.c -o test error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
I think this need more thought:
For this, the first err makes not sense since both -mprefixed and -mpcrel is specified:
Shouldn't it just give:
For this:
I think it's better if it says: