Exemple #1
0
        /// <summary>
        /// Called when we need to generate an RtlBranch in the middle of an operation.
        /// Normally, branches are at the end of the Rtl's of a translated instruction,
        /// but in some cases, they are not.
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="target"></param>
        /// <param name="?"></param>
        public void BranchInMiddleOfInstruction(Expression condition, Address target, RtlClass rtlClass)
        {
            var branch = new RtlBranch(condition, target, rtlClass);

            branch.NextStatementRequiresLabel = true;
            instrs.Add(branch);
        }
 public bool VisitBranch(RtlBranch branch)
 {
     var branchPat = pattern as RtlBranch;
     if (branchPat == null)
         return false;
     matcher.Pattern = branchPat.Condition;
     return matcher.Match(branch.Condition);
 }
Exemple #3
0
 public bool VisitBranch(RtlBranch branch)
 {
     if (!(pattern is RtlBranch branchPat))
     {
         return(false);
     }
     matcher.Pattern = branchPat.Condition;
     return(matcher.Match(branch.Condition));
 }