[LLVMdev] More address registers

Andreas Fredriksson deplinenoise at gmail.com
Mon Feb 18 13:24:51 PST 2008


2008/2/15, Andreas Fredriksson <deplinenoise at gmail.com>:
>
> I tried mocking this up using the following. (Base is what's returned as
> the Ax in the move expression above when the DAG is constructed due to
> SelectAddr().)
>
>     SDOperand chain = CurDAG->getCopyToReg(Base, M68K::A3, Base);
>     Base = CurDAG->getCopyFromReg(chain, M68K::A3, MVT::i32);
>

Replying to myself here.

This worked a bit better :)

    const unsigned addressReg =
RegMap->createVirtualRegister(&M68K::AR32RegClass);
    SDOperand chain = CurDAG->getCopyToReg(Base, addressReg, Base);
    Base = CurDAG->getCopyFromReg(chain, addressReg, MVT::i32);


// Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080218/abc02ccc/attachment.html>


More information about the llvm-dev mailing list