Displaying 1 result from an estimated 1 matches for "m6502isellow".
2016 Feb 12
3
Experimental 6502 backend; memory operand folding problem
...ate or a value loaded from memory. There is no instruction that adds A to
another register.
I had thought LLVM would allocate a stack object for the second operand, but
it didn't, and LLVM threw an ISel matching error. I currently solve this with
a custom ADD lowering function, see LowerADD in M6502ISelLowering.cpp.
Question: Is custom lowering ideal for this situation? Or, is there another way
to coax LLVM into recognizing ADD?
The problem I'm stuck on is folding memory operands. In the test file above,
in @testSum, switch %a, %b to %b, %a. llc will assert in Register Spilling:
"Remaining...