https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99144
Bug ID: 99144 Summary: -mtune=68040 doesn't respect restrictions set by -march=68060 Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: miro.kropacek at gmail dot com Target Milestone: --- man gcc states: -m68060 [...] This option inhibits the use of 68020 and 68881/68882 instructions that have to be emulated by software on the 68060. -mtune=tune Tune the code for a particular microarchitecture, within the constraints set by -march and -mcpu. ... and yet when I compile this code with -march=68060 -mtune=68040: extern float x(int i); extern unsigned long long y(int h); extern unsigned long long z; int main() { z = y(0)*y(1); return 0; } I can see a "mulu.l %d1,%d1:%d2" generated in the final code. This shouldn't be possible as the 64-bit mulu has to be emulated by software on the 68060. The same can be observered in a reverse scenario when "fintrz" (emulated on 040) is generated even if I set -march=68040 -mtune=68060. Looking into m68k.md and m68k.h the reason is obvious, there is no TARGET_68060 defined, i.e. 040 and 060 instruction sets are considered equal and only TUNE_68040 and TUNE_68060 is taken into account.