diff options
| author | LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> | 2019-10-31 19:09:03 +0100 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-10-31 19:09:03 +0100 |
| commit | eee639d6ba544fa5dd9352426d55e91bc54e157d (patch) | |
| tree | 1df440ca57d8c1725e84f403fbeecddb8e508a3a /ChocolArm64/IntermediateRepresentation/Operation.cs | |
| parent | 35443bac5a16ced668d84e0a22c21ca9076b3924 (diff) | |
.NET Core 3.0 is here! (#784)
* .NET Core 3.0 is here!
* Remove IMemoryManager.cs and its references.
* Add T Math/F.FusedMultiplyAdd(T, T, T). Nits.
* Nit.
* Update appveyor.yml
* Revert "Resolve Visual Studio build issues"
This reverts commit 1772128ce0fc058e6280001aace3a77a7a96897b.
* Update SvcTable.cs
Diffstat (limited to 'ChocolArm64/IntermediateRepresentation/Operation.cs')
| -rw-r--r-- | ChocolArm64/IntermediateRepresentation/Operation.cs | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/ChocolArm64/IntermediateRepresentation/Operation.cs b/ChocolArm64/IntermediateRepresentation/Operation.cs deleted file mode 100644 index dcd01bcd..00000000 --- a/ChocolArm64/IntermediateRepresentation/Operation.cs +++ /dev/null @@ -1,112 +0,0 @@ -using ChocolArm64.State; -using System; -using System.Reflection; -using System.Reflection.Emit; - -namespace ChocolArm64.IntermediateRepresentation -{ - class Operation - { - public BasicBlock Parent { get; set; } - - public OperationType Type { get; } - - private object[] _arguments { get; } - - private Operation(OperationType type, params object[] arguments) - { - Type = type; - _arguments = arguments; - } - - public T GetArg<T>(int index) - { - return (T)GetArg(index); - } - - public object GetArg(int index) - { - if ((uint)index >= _arguments.Length) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - - return _arguments[index]; - } - - public static Operation Call(MethodInfo info) - { - return new Operation(OperationType.Call, info); - } - - public static Operation CallVirtual(MethodInfo info) - { - return new Operation(OperationType.CallVirtual, info); - } - - public static Operation IL(OpCode ilOp) - { - return new Operation(OperationType.IL, ilOp); - } - - public static Operation ILBranch(OpCode ilOp, ILLabel target) - { - return new Operation(OperationType.ILBranch, ilOp, target); - } - - public static Operation LoadArgument(int index) - { - return new Operation(OperationType.LoadArgument, index); - } - - public static Operation LoadConstant(int value) - { - return new Operation(OperationType.LoadConstant, value); - } - - public static Operation LoadConstant(long value) - { - return new Operation(OperationType.LoadConstant, value); - } - - public static Operation LoadConstant(float value) - { - return new Operation(OperationType.LoadConstant, value); - } - - public static Operation LoadConstant(double value) - { - return new Operation(OperationType.LoadConstant, value); - } - - public static Operation LoadContext() - { - return new Operation(OperationType.LoadContext); - } - - public static Operation LoadField(FieldInfo info) - { - return new Operation(OperationType.LoadField, info); - } - - public static Operation LoadLocal(int index, RegisterType type, RegisterSize size) - { - return new Operation(OperationType.LoadLocal, index, type, size); - } - - public static Operation MarkLabel(ILLabel label) - { - return new Operation(OperationType.MarkLabel, label); - } - - public static Operation StoreContext() - { - return new Operation(OperationType.StoreContext); - } - - public static Operation StoreLocal(int index, RegisterType type, RegisterSize size) - { - return new Operation(OperationType.StoreLocal, index, type, size); - } - } -}
\ No newline at end of file |
