Page MenuHomePhabricator

[cfe][M68k] (Patch 7/8) Basic Clang support
Needs ReviewPublic

Authored by myhsu on Sep 27 2020, 10:27 PM.

Details

Summary
  1. Add M68k as new Clang target
  2. Add new attribute to support M68k's ISR (Interrupt Service Routine)

Diff Detail

Event Timeline

myhsu created this revision.Sep 27 2020, 10:27 PM
Herald added a project: Restricted Project. · View Herald Transcript
myhsu requested review of this revision.Sep 27 2020, 10:27 PM
myhsu updated this revision to Diff 295468.Sep 30 2020, 10:15 PM

Fix formatting issues

myhsu updated this revision to Diff 295706.Oct 1 2020, 5:24 PM

Update licenses

myhsu updated this revision to Diff 296064.EditedOct 4 2020, 11:38 AM

Fix the CPU name passing to the backend. Also removed M68060 for now, since backend hasn't fully implemented it yet.

myhsu updated this revision to Diff 302187.Sun, Nov 1, 4:31 PM
myhsu retitled this revision from [cfe][M68K] (Patch 7/8) Basic Clang support to [cfe][M68k] (Patch 7/8) Basic Clang support.
myhsu edited the summary of this revision. (Show Details)

[NFC] Rename M680x0 to M68k

rengolin added inline comments.Tue, Nov 17, 3:31 AM
clang/lib/Basic/Targets.cpp
314

No support for bare-metal?

clang/lib/Basic/Targets/M68k.cpp
123

no "sp", "pc", etc? Or are all of them aliased to those?

clang/lib/CodeGen/TargetInfo.cpp
8083

That's an odd comment... :)

What doesn't work right now? Something or everything?

RKSimon added inline comments.Tue, Nov 17, 3:52 AM
clang/lib/Basic/CMakeLists.txt
78

(sorting) - move after Le64.cpp

clang/lib/CodeGen/TargetInfo.cpp
8087

(style) Use const auto * for cast results

bruno added a subscriber: bruno.Thu, Nov 19, 11:37 AM

Looking forward to see m68k support (and hopefully sega genesis toolchain support someday)!

clang/lib/Basic/Targets/M68k.cpp
73

This doesn't seem to match the coding style, clang-format to the rescue.

89

Can you make all the defineMacro inline within the cases? Clarity seems more useful here.

clang/lib/Basic/Targets/M68k.h
35

Can you remove the comment and add the enum back whenever you introduce CK_68060 support?