[fpc-devel] What's the difference between -Cp and -Op?
J. Gareth Moreton
gareth at moreton-family.com
Wed Sep 7 23:57:11 CEST 2022
Aah, that's useful information, especially the lea/shl example. Thanks
Jonas.
Ideally -Op shouldn't be set to an architecture that's older than the
one for -Cp (i.e. optimising for a processor that's older than the
minimum type it's guaranteed to run on), but is it possible to actually
do so?
Gareth aka. Kit
On 07/09/2022 19:15, Jonas Maebe via fpc-devel wrote:
>
>
> On 2022-09-07 16:34, J. Gareth Moreton via fpc-devel wrote:
>> So this one has eluded me a little bit... what's the exact difference
>> between the -Cp and -Op options?
>
> -Cp: the code is only guaranteed to run on this cpu and usually also
> later ones (the code generator/optimiser can use instruction that are
> not available on earlier/other cpus). E.g.: use BMI2 instructions.
> -Op: the code is optimised for this cpu, but will still run on
> earlier/later ones. E.g., use lea instead of shl on a particular cpu
> because it's faster there, even if it's not the case on all of them.
> -Cf: use this instruction set to perform floating point calculations.
> It is independently handled from the two previous settings, even if it
> can indirectly also influence the minimum required CPU.
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list