As a major degree project, I started working on adding vector instruction to the LLVM Sparc(modify for AJIT processor) backend.
My work is to implement VADDD, VSUBD, VUMULD, VSMULD instructions.
Their instruction format is as follows:-
31-30 op (always 10)
13 i (always 1)
9-7 (datatype 8->001, 16->010, 32->100)
6-5 (always 10)
https://llvm.org/docs/ExtendingLLVM.html suggest me to use LLVM Custom Intrinsic to represent this VADDD operation. Is there any detail example code for other architectures available to look at?
Am I need to define a new class in SparcInsFormat.td because these instructions can’t use predefined format-3 class of other arithmetic instructions(8-bit felid of asi changed to specify vector datatype)?
Does the implementation of Sparc VIS resemble with these instructions?
May some LLVM backend experts give me an initial idea on what steps should I take to add these instructions?
I have gone through LLVM target-independent code generator documentation.
SPARC architecture manual and AJIT processor ISA is attached to the mail.
Thanks and Regards,
isa.txt (11.4 KB)