@@ -11740,6 +11740,42 @@ static bool inlineIsAssignableFrom(TR::Node *node, TR::CodeGenerator *cg)
11740
11740
return true;
11741
11741
}
11742
11742
11743
+ TR::Register *J9::Z::TreeEvaluator::inlineCheckAssignableFromEvaluator(TR::Node *node, TR::CodeGenerator *cg)
11744
+ {
11745
+ TR::Register *thisClassReg = cg->evaluate(node->getFirstChild());
11746
+ TR::Register *checkClassReg = cg->evaluate(node->getSecondChild());
11747
+
11748
+ TR::Register *resultReg = cg->allocateRegister();
11749
+ TR::LabelSymbol *helperCallLabel = generateLabelSymbol(cg);
11750
+ TR::LabelSymbol *doneLabel = generateLabelSymbol(cg);
11751
+
11752
+ TR::RegisterDependencyConditions* deps = new (cg->trHeapMemory()) TR::RegisterDependencyConditions(0, 3, cg);
11753
+ deps->addPostCondition(thisClassReg, TR::RealRegister::AssignAny);
11754
+ deps->addPostConditionIfNotAlreadyInserted(checkClassReg, TR::RealRegister::AssignAny);
11755
+ deps->addPostCondition(resultReg, TR::RealRegister::AssignAny);
11756
+
11757
+ /*
11758
+ * TODO: add inlined tests (classEqualityTest, SuperclassTest, etc)
11759
+ * Inlined tests will be used when possible, or will jump to the OOL section
11760
+ * and perform the tests using the CHelper when not possible
11761
+ */
11762
+
11763
+ generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BRC, node, helperCallLabel);
11764
+ TR_S390OutOfLineCodeSection *outlinedSlowPath = new (cg->trHeapMemory()) TR_S390OutOfLineCodeSection(helperCallLabel, doneLabel, cg);
11765
+ cg->getS390OutOfLineCodeSectionList().push_front(outlinedSlowPath);
11766
+ outlinedSlowPath->swapInstructionListsWithCompilation();
11767
+
11768
+ generateS390LabelInstruction(cg, TR::InstOpCode::label, node, helperCallLabel);
11769
+ resultReg = TR::TreeEvaluator::performCall(node, false, cg);
11770
+
11771
+ generateS390BranchInstruction(cg, TR::InstOpCode::BRC, TR::InstOpCode::COND_BRC, node, doneLabel); // exit OOL section
11772
+ outlinedSlowPath->swapInstructionListsWithCompilation();
11773
+
11774
+ generateS390LabelInstruction(cg, TR::InstOpCode::label, node, doneLabel, deps);
11775
+ node->setRegister(resultReg);
11776
+
11777
+ return resultReg;
11778
+ }
11743
11779
11744
11780
bool
11745
11781
J9::Z::TreeEvaluator::VMinlineCallEvaluator(TR::Node * node, bool indirect, TR::CodeGenerator * cg)
0 commit comments