[PATCH] D32669: [Nios2] Target registration
Andrei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 29 06:22:55 PDT 2017
AndreiGrischenko created this revision.
Herald added a subscriber: mgorny.
Hi,
Previously I sent an RFC regarding Nios2 backend introduction in LLVM compiler. It was 12 of April with subject "[llvm-dev] [RFC] Nios II backend".
So there is the first patch for registering Nios2 target.
I registered triple for Nios2, created Nios2 directory in Target and added several initial files for Nios2 target.
In this patch I introduced general classes for Nios2 instructions and register set. An example of one instruction is also added.
So my aim was to prepare patch without tons of lines of code to be simple for review. Let me know, please, if anyway this patch is too big. Or probably, in opposite, you would like to have more changes related to Nios2 target.
I checked llc with this patch, it accepts Nios2 triple and architecture. In the next patch I plan to introduce Nios2 subtargets and cover https://reviews.llvm.org/diffusion/L/ instructions. (Nios2 architecture has two ISA, https://reviews.llvm.org/diffusion/L/ and R2. https://reviews.llvm.org/diffusion/L/ is described here: https://www.altera.com/en_US/pdfs/literature/hb/nios2/n2cpu-nii5v1gen2.pdf)
Current status of Nios2 project is I can produce correct assembly for simple test cases. That assembly is checked for correctness on Nios2 hardware.
To test that I did not break anything, I built common targets and ran "make check".
I'm open for any questions, suggestions, advices and objections.
Thanks in advance,
Andrei.
https://reviews.llvm.org/D32669
Files:
../llvm/CMakeLists.txt
../llvm/include/llvm/ADT/Triple.h
../llvm/lib/Support/Triple.cpp
../llvm/lib/Target/LLVMBuild.txt
../llvm/lib/Target/Nios2/CMakeLists.txt
../llvm/lib/Target/Nios2/LLVMBuild.txt
../llvm/lib/Target/Nios2/MCTargetDesc/CMakeLists.txt
../llvm/lib/Target/Nios2/MCTargetDesc/LLVMBuild.txt
../llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.cpp
../llvm/lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.h
../llvm/lib/Target/Nios2/Nios2.h
../llvm/lib/Target/Nios2/Nios2.td
../llvm/lib/Target/Nios2/Nios2InstrFormats.td
../llvm/lib/Target/Nios2/Nios2InstrInfo.td
../llvm/lib/Target/Nios2/Nios2RegisterInfo.td
../llvm/lib/Target/Nios2/Nios2TargetMachine.cpp
../llvm/lib/Target/Nios2/Nios2TargetMachine.h
../llvm/lib/Target/Nios2/TargetInfo/CMakeLists.txt
../llvm/lib/Target/Nios2/TargetInfo/LLVMBuild.txt
../llvm/lib/Target/Nios2/TargetInfo/Nios2TargetInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32669.97187.patch
Type: text/x-patch
Size: 27238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170429/09ba3c01/attachment.bin>
More information about the llvm-commits
mailing list