- Add M68k as new Clang target
- Add new attribute to support M68k's ISR (Interrupt Service Routine)
Details
Diff Detail
Event Timeline
Fix the CPU name passing to the backend. Also removed M68060 for now, since backend hasn't fully implemented it yet.
Looking forward to see m68k support (and hopefully sega genesis toolchain support someday)!
clang/lib/Basic/Targets/M68k.cpp | ||
---|---|---|
74 | This doesn't seem to match the coding style, clang-format to the rescue. | |
90 | Can you make all the defineMacro inline within the cases? Clarity seems more useful here. | |
clang/lib/Basic/Targets/M68k.h | ||
36 | Can you remove the comment and add the enum back whenever you introduce CK_68060 support? |
- Addressed all the feedbacks
- Fixed minor issues that would retrieve the wrong TargetCodeGenInfo instance
clang/lib/Basic/Targets.cpp | ||
---|---|---|
314 | currently we don't have any plan for that | |
clang/lib/Basic/Targets/M68k.cpp | ||
124 | stack pointer is aliased to a7, but I'll add pc into the list. | |
clang/lib/CodeGen/TargetInfo.cpp | ||
8085 | Seems to work after I fixed a minor issue in getting the correct TargetCodeGenInfo. Will remove this comment. |
Thanks for the changes. This looks good to me but I'll let others check again and approve.
clang/lib/Basic/Targets/M68k.cpp | ||
---|---|---|
38–50 | If we're in SysV psABI land, then the stack is 32-bit aligned. If we're in actual ABI used by everyone out there, i.e. GCC's default, then it's only 16-bit aligned, and your integer types also have the wrong alignment, so you will get ABI incompatibility with GCC-built binaries as provided by distributions like Debian. | |
63 | GCC's -mcpu excludes any M prefix and is just the number. | |
77–79 | Where are these coming from? GCC only defines __m68k__. |