void TR_X86FPCompareAnalyser::setInputs(TR::Node *firstChild, TR::Register *firstRegister, TR::Node *secondChild, TR::Register *secondRegister, bool disallowMemoryFormInstructions, bool disallowOperandSwapping) { if (firstRegister) { setReg1(); } if (secondRegister) { setReg2(); } if (!disallowMemoryFormInstructions && firstChild->getOpCode().isMemoryReference() && firstChild->getReferenceCount() == 1) { setMem1(); } if (!disallowMemoryFormInstructions && secondChild->getOpCode().isMemoryReference() && secondChild->getReferenceCount() == 1) { setMem2(); } if (firstChild->getReferenceCount() == 1) { setClob1(); } if (secondChild->getReferenceCount() == 1) { setClob2(); } if (disallowOperandSwapping) { setNoOperandSwapping(); } }
//~ helper function. can just pass a string designation of register void Processor::setReg(string regDesignator, word val){ if(regDesignator == "r1"){ setReg1(val); }else if(regDesignator == "r2"){ setReg2(val); }else if(regDesignator == "r3"){ setReg3(val); }else if(regDesignator == "r4"){ setReg4(val); }else if(regDesignator == "r5"){ setReg5(val); }else{ printf("illegal register designator in setReg command\n"); exit(1);//need to switch this to an abend interrupt } }
void TR_S390BinaryAnalyser::remapInputs(TR::Node * firstChild, TR::Register * firstRegister, TR::Node * secondChild, TR::Register * secondRegister) { if (!cg()->useClobberEvaluate()) { if (firstRegister) { setReg1(); } if (secondRegister) { setReg2(); } // firstRegister is always assumed if (cg()->canClobberNodesRegister(firstChild)) { setClob1(); } else { resetClob1(); } // don't touch secondChild memory refs if (!getMem2()) { if (cg()->canClobberNodesRegister(secondChild)) { setClob2(); } else { resetClob2(); } } } }