Exemplo n.º 1
0
        //Register a unary arithmetic opcode which allows the S bit.
        internal void RegisterDataOpLogical(DataOpLogicalUnary opHandler, uint base_opcode, string basename)
        {
            DataOpBuilderLogical b = new DataOpBuilderLogical();

            b.opcode           = base_opcode;
            b.name             = basename;
            b.IsUnaryOperation = true;
            b.UnaryOp          = opHandler;
            b.owner            = this;
            b.StartBuild();
        }
Exemplo n.º 2
0
 static internal InstructionFunc GenerateLogicalDataOpUnary(
     DataOpEvaluateOperand2Func EvaluateOperand2, DataOpLogicalUnary UnaryOp, DataOpSaveResultFunc SaveResult, DataOpHandleSetFlagsFunc SetFlags)
 {
     return(delegate(uint opcode)
     {
         uint Rd = ((opcode & rd_mask) >> 12);
         //Unary operations only have operand 2 (which is denoted by b everywhere else)
         bool shift_carry = false;
         uint operand = EvaluateOperand2(opcode, ref shift_carry);
         uint result = UnaryOp(operand);
         SaveResult(Rd, result);
         SetFlags(opcode, Rd, result, shift_carry);
         return 1;
     });
 }