Exemplo n.º 1
0
 private void RewriteCall(HexagonInstruction instr)
 {
     if (instr.ConditionPredicate != null)
     {
         var pred = RewritePredicateExpression(instr.ConditionPredicate, !instr.ConditionInverted);
         m.BranchInMiddleOfInstruction(pred, instr.Address + 4, InstrClass.ConditionalTransfer);
     }
     m.Call(OperandSrc(instr.Operands[0]) !, 0);
 }
Exemplo n.º 2
0
        private void RewriteJump(HexagonInstruction instr, MachineOperand opDst)
        {
            var aop = (AddressOperand)opDst;

            if (instr.ConditionPredicate != null)
            {
                //if (instr.ConditionPredicateNew)
                //    throw new NotImplementedException(".NEW");
                var cond = OperandSrc(instr.ConditionPredicate) !;
                m.Branch(cond, aop.Address);
            }
            else
            {
                m.Goto(aop.Address);
            }
        }