[PATCH] D32669: [Nios2] Target registration

Andrei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 05:17:21 PDT 2017


AndreiGrischenko added a comment.

> Is there enough functional here that there should be tests for? i.e. make sure march/mcpu switches are recognized, that the target is recognized, etc.

Initially I thought about adding such check for the triple is supported. But it was not obvious how to do that and llvm-experienced guys around said it was not a big sense to add tests at this stage.
Even now I use "not not llc" to make my lit test work. Anyway I tried to create such test case, please look. The test checks for -mtriple=nios2 and -march=nios2 are accepted. Further I will expand this tests with -mcpu after adding CPUs.



================
Comment at: llvm/lib/Target/Nios2/LLVMBuild.txt:1
+;===- ./lib/Target/Nios2/LLVMBuild.txt --------------------------*- Conf -*--===;
+;
----------------
craig.topper wrote:
> 80 columns. I think the first line of many of your files are too long.
I cannot explain why that happened. Will fix.


================
Comment at: llvm/lib/Target/Nios2/Nios2InstrFormats.td:40
+  bits<6> Opcode = 0;
+  bits<6> OpxH = 0;
+  bits<5> shamt = 0;
----------------
craig.topper wrote:
> Are the OpxH and shamt fields used?
No at the moment. I will remove them.


================
Comment at: llvm/lib/Target/Nios2/Nios2InstrFormats.td:97
+  bits<5> rC;
+  bits<11> opx;
+
----------------
craig.topper wrote:
> Is this unused?
Yes, this is unused. I will update this instruction format to be closer to our current version.
There are just initial formats are added. Nios2 has more instruction formats and I plan to expand that further.


https://reviews.llvm.org/D32669





More information about the llvm-commits mailing list