Displaying 2 results from an estimated 2 matches for "resultreg".
2014 Feb 08
2
[LLVMdev] selecting ISD node - help
...ct for ISD::RDMSR.
Now I know rdmsr works like so:
mov r/ecx, <id>
rdmsr
r/eax holds the lower 32/64 bit
>From what I understood this needs a Token Factor node, nodes which are
dependent on each other?
case X86ISD::RDMSR:
{
unsigned idReg;
SDValue idRegValue;
unsigned resultReg;
SDLoc dl = SDLoc(Node);
SDValue id = Node->getOperand(0);
EVT resultType = Node->getValueType(0);
if(Subtarget->is64Bit())
{
idReg = X86::RCX;
resultReg = X86::RAX;
}
else
{
idReg = X86::ECX;
resultReg = X86::EAX;
}
idRegValue = CurDAG->...
2014 Feb 08
2
[LLVMdev] selecting ISD node - help
...e. SDValue(setIdNode, 1))
> in the RDMSR node.
> 2. Give your RDMSR node type MVT::Glue instead of MVT::Other
I tried doing what you said, and the DAG looks like how I think it supposed
to look like (attached the picture below).
if(Subtarget->is64Bit())
{
idReg = X86::RCX;
resultReg = MF.addLiveIn(X86::RAX, &X86::GR64RegClass);
}
else
{
idReg = X86::ECX;
resultReg = MF.addLiveIn(X86::EAX, &X86::GR32RegClass);
}
idRegValue = CurDAG->getRegister(idReg, resultType);
SDValue setIdNode = CurDAG->getCopyToReg(CurDAG->getEntryNode(), dl,
i...