[PATCH] D88393: [cfe][M68k] (Patch 7/8) Basic Clang support

Min-Yih Hsu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 1 13:44:05 PST 2021


myhsu added inline comments.


================
Comment at: clang/lib/Basic/Targets/M68k.cpp:63
+            .Case("generic", CK_68000)
+            .Case("M68000", CK_68000)
+            .Case("M68010", CK_68010)
----------------
jrtc27 wrote:
> GCC's -mcpu excludes any M prefix and is just the number.
we also support -mcpu with just number via `m68k::getM68kTargetCPU`


================
Comment at: clang/lib/Basic/Targets/M68k.cpp:77-79
+  Builder.defineMacro("M68k");
+  Builder.defineMacro("__M68k__");
+  Builder.defineMacro("__M68K__");
----------------
jrtc27 wrote:
> Where are these coming from? GCC only defines `__m68k__`.
I think GCC does: https://github.com/gcc-mirror/gcc/blob/b90d051ecbc1d8972ae1bf0cd7588fcc66df0722/gcc/config/m68k/m68k.h#L64

Also I found this page: https://sourceforge.net/p/predef/wiki/Architectures


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88393/new/

https://reviews.llvm.org/D88393



More information about the cfe-commits mailing list