Cosmos/source2/IL2PCU/Cosmos.IL2CPU.X86/IL/Ldloca.cs
kudzu_cp d005150077
2009-07-23 20:02:00 +00:00

53 lines
1.6 KiB
C#

using System;
namespace Cosmos.IL2CPU.X86.IL
{
[Cosmos.IL2CPU.OpCode(ILOpCode.Code.Ldloca)]
public class Ldloca: ILOpX86
{
#region Old code
// using System;
// using System.Linq;
//
// using CPUx86 = Indy.IL2CPU.Assembler.X86;
// using Indy.IL2CPU.Assembler;
//
// namespace Indy.IL2CPU.IL.X86 {
// [Cosmos.IL2CPU.OpCode(ILOpCode.Code.Ldloca)]
// public class Ldloca: ILOpX86 {
// private int mAddress;
// protected void SetLocalIndex(int aIndex, MethodInformation aMethodInfo) {
// mAddress = aMethodInfo.Locals[aIndex].VirtualAddresses.LastOrDefault();
// }
// public Ldloca(ILReader aReader, MethodInformation aMethodInfo)
// : base(aReader, aMethodInfo) {
// SetLocalIndex(aReader.OperandValueInt32, aMethodInfo);
// // return;
// //}
// //VariableDefinition xVarDef = aReader.Operand as VariableDefinition;
// //if (xVarDef != null) {
// // mIsReferenceTypeField = xVarDef.VariableType.IsClass;
// // SetLocalIndex(xVarDef.Index, aMethodInfo);
// //}
// }
//
// public int Address {
// get {
// return mAddress;
// }
// }
//
// public sealed override void DoAssemble() {
// new CPUx86.Move { DestinationReg = CPUx86.Registers.EDX, SourceReg = CPUx86.Registers.EBP };
// new CPUx86.Sub { DestinationReg = CPUx86.Registers.EDX, SourceValue = (uint)(Address * -1) };
// new CPUx86.Push { DestinationReg = CPUx86.Registers.EDX };
// Assembler.StackContents.Push(new StackContent(4, true, false, false));
// }
// }
// }
#endregion
}
}