Adding instruction to mips backend


I've extended the LLVM IR with a new Instruction. This part works well. But I also want to extend the MIPS backend with an associative machine instruction, and in this part, I didn't succeed. I read the tutorials, but I couldn't realize the code generation for the new LLVM IR instruction. Which parts have to be modified ?


What sorts of errors are you seeing? My first guess would be that you need to add support for the new instruction to the SelectionDAG machinery (see lib/CodeGen/SelectionDAG/*).

What instruction are you looking to add?

There are no errors, but the new instruction isn't processed by the backend. I have added support to SelectionDAG, but probably not enough. The instruction I want to add is a load instruction. I need this new load instruction because I want to distinguish it from the already available load instruction. This is necessary because of the target platform which uses this new load for special purposes. I think the addition of the SelectionDAG is insufficient. Is there a detailed description, how to insert all necessary information into the SelectionDAG part ?