EmitInstructionWithImmediate() public method

public EmitInstructionWithImmediate ( ConditionCode conditionCode, byte opcode, bool setCondition, int firstRegister, int destinationRegister, int rotate, int immediate ) : void
conditionCode ConditionCode
opcode byte
setCondition bool
firstRegister int
destinationRegister int
rotate int
immediate int
return void
 /// <summary>
 /// Emits the data processing instruction.
 /// </summary>
 /// <param name="node">The node.</param>
 /// <param name="emitter">The emitter.</param>
 /// <param name="opcode">The opcode.</param>
 /// <exception cref="InvalidCompilerException"></exception>
 protected void EmitDataProcessingInstruction(InstructionNode node, MachineCodeEmitter emitter, byte opcode)
 {
     if (node.Operand2.IsCPURegister && node.Operand3.IsShift)
     {
         emitter.EmitInstructionWithRegister(node.ConditionCode, opcode, node.UpdateStatus, node.Operand1.Register.Index, node.Result.Register.Index, node.Operand3.ShiftType, node.Operand2.Register.Index);
     }
     else if (node.Operand2.IsConstant && node.Operand3.IsConstant)
     {
         emitter.EmitInstructionWithImmediate(node.ConditionCode, opcode, node.UpdateStatus, node.Operand1.Register.Index, node.Result.Register.Index, (int)node.Operand2.ConstantSignedLongInteger, (int)node.Operand3.ConstantSignedLongInteger);
     }
     else
     {
         throw new InvalidCompilerException();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Emits the data processing instruction.
 /// </summary>
 /// <param name="node">The node.</param>
 /// <param name="emitter">The emitter.</param>
 /// <param name="opcode">The opcode.</param>
 /// <exception cref="InvalidCompilerException"></exception>
 protected void EmitDataProcessingInstruction(InstructionNode node, MachineCodeEmitter emitter, byte opcode)
 {
     if (node.Operand2.IsRegister && node.Operand3.IsShift)
     {
         emitter.EmitInstructionWithRegister(node.ConditionCode, opcode, node.UpdateStatus, node.Operand1.Register.Index, node.Result.Register.Index, node.Operand3.ShiftType, node.Operand2.Register.Index);
     }
     else if (node.Operand2.IsConstant && node.Operand3.IsConstant)
     {
         emitter.EmitInstructionWithImmediate(node.ConditionCode, opcode, node.UpdateStatus, node.Operand1.Register.Index, node.Result.Register.Index, (int)node.Operand2.ConstantSignedLongInteger, (int)node.Operand3.ConstantSignedLongInteger);
     }
     else
     {
         throw new InvalidCompilerException();
     }
 }