It cooks the minimal patch to construct the codegen infra for CSKY and generate the first basic ALU operation add and related test.
Next, all basic integer instruction codegen will follow.
Details
Diff Detail
Event Timeline
Some comments, mostly on style, but this looks like a fair skeleton lowering to me.
The test shows the back-end recognising the calling convention registers from both arguments and return values and using the right instruction.
This looks good to me as a good seed to start adding more instructions.
llvm/lib/Target/CSKY/CSKYISelLowering.cpp | ||
---|---|---|
146 | Are you expecting more behaviour here? This is a weird idiom to just assert if the CC isn't C or Fast. | |
248 | va_arg is not supported yet, right? Maybe an assert here or when lowering the arguments. | |
llvm/lib/Target/CSKY/CSKYMCInstLower.cpp | ||
26 | ||
llvm/lib/Target/CSKY/CSKYMCInstLower.h | ||
28 |
llvm/lib/Target/CSKY/CMakeLists.txt | ||
---|---|---|
28 | Since you use functionalities from the CSKYDesc library (i.e. stuff from your MCTargetDesc folder), you need to link it explicitly. Otherwise the build might fail if you build LLVM libraries as shared objects |
(nit) sorting