コード例 #1
0
ファイル: RtlEmitter.cs プロジェクト: xxtxiaofeng/reko
        /// <summary>
        /// Generates an RTL side effect instruction, typically for instructions which
        /// are modeled by their effect on the processor that can't be seen in the processor
        /// registers or memory.
        /// </summary>
        /// <param name="sideEffect">Expression which when evaluated causes the side effect.</param>
        /// <param name="iclass"></param>
        /// <returns>A reference to this RtlEmitter.</returns>
        public RtlEmitter SideEffect(Expression sideEffect, InstrClass iclass = InstrClass.Linear)
        {
            var se = new RtlSideEffect(sideEffect, iclass);

            Instructions.Add(se);
            return(this);
        }
コード例 #2
0
        public RtlEmitter SideEffect(Expression sideEffect, RtlClass rtlc = RtlClass.Linear)
        {
            var se = new RtlSideEffect(sideEffect);

            se.Class = rtlc;
            instrs.Add(se);
            return(this);
        }
コード例 #3
0
ファイル: RtlInstructionMatcher.cs プロジェクト: xor2003/reko
 public bool VisitSideEffect(RtlSideEffect side)
 {
     var sidePat = pattern as RtlSideEffect;
     if (sidePat == null)
         return false;
     matcher.Pattern = sidePat.Expression;
     return matcher.Match(side.Expression);
 }
コード例 #4
0
 public bool VisitSideEffect(RtlSideEffect side)
 {
     if (!(pattern is RtlSideEffect sidePat))
     {
         return(false);
     }
     matcher.Pattern = sidePat.Expression;
     return(matcher.Match(side.Expression));
 }