Mosa.Compiler.Framework.Context.ReplaceInstructionOnly C# (CSharp) Méthode

ReplaceInstructionOnly() public méthode

Replaces the instruction only.
public ReplaceInstructionOnly ( BaseInstruction instruction ) : void
instruction BaseInstruction The instruction.
Résultat void
        public void ReplaceInstructionOnly(BaseInstruction instruction)
        {
            Instruction = instruction;
        }

Usage Example

 /// <summary>
 /// Visitation function for AddFloat.
 /// </summary>
 /// <param name="context">The context.</param>
 void IIRVisitor.AddFloat(Context context)
 {
     if (context.Result.IsR4)
     {
         context.ReplaceInstructionOnly(X86.Addss);
         context.Size = InstructionSize.Size32;
     }
     else
     {
         context.ReplaceInstructionOnly(X86.Addsd);
         context.Size = InstructionSize.Size64;
     }
 }
All Usage Examples Of Mosa.Compiler.Framework.Context::ReplaceInstructionOnly