3 ms·
> gcc -DCTZ -m32 -mtune=i386 -o- -O3 -S case27.c > ... > OUCH: the CMOVcc instruction is not available on the i386 processor! To "tune" for a processor isn't
by kazinator 3y ago
> gcc -DCTZ -m32 -mtune=i386 -o- -O3 -S case27.c
> ...
> OUCH: the CMOVcc instruction is not available on the i386 processor!
To "tune" for a processor isn't the same thing as to "target" that processor.
In other words -mtune isn't a substitute for -mcpu; it is independent. When -mcpu is used, it implies some tuning as if -mtune were used, but -mtune overrides that.
Except for exploring compiler behavior, it doesn't make sense to tune for i386 while generating instructions for a much newer chip in that family; but it looks like it may be the GCC invoker's responsibility to get their ducks in a row here by using a combination of options that makes sense.
(Sure, would be better if there was a detection for that and diagnostic.)