llvm icon indicating copy to clipboard operation
llvm copied to clipboard

Implement wide load program memory pseudo instructions

Open dylanmckay opened this issue 9 years ago • 3 comments

Currently no logic exists in AVRExpandPseudoInsts.cpp to lower the lpmw Rd, Z or lpmw Rd, Z+ instructions.

They are defined as pseudo instructions, but they are not lowered. Because of this, using them will cause an error in LLVM.

LLVM ERROR: Not supported instr: <MCInst 102 <MCOperand Reg:52> <MCOperandReg:52>>

dylanmckay avatar Jun 10 '15 10:06 dylanmckay

I believe we shouldn't even have wide program memory load instructions.

The instruction selector will never need it (lpm instructions will only be needed in hand-crafted assembly).

I will go ahead and remove the wide variants.

dylanmckay avatar Jul 16 '15 13:07 dylanmckay

The instruction selector will never need it (lpm instructions will only be needed in hand-crafted assembly).

I'm not sure that is true. This code looks like it is trying to select a wide flash load.

That said I'm okay with removing it since I don't believe in wide pseudo instructions anyway... :P

agnat avatar Jul 16 '15 14:07 agnat

I'm not sure that is true. This code looks like it is trying to select a wide flash load.

I stand corrected.

That said I'm okay with removing it since I don't believe in wide pseudo instructions anyway... :P

I think we should hold off until we get the backend sorted out so we don't actually need them ;)

dylanmckay avatar Jul 16 '15 14:07 dylanmckay