mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-30 04:40:14 +00:00
18 lines
No EOL
539 B
C#
18 lines
No EOL
539 B
C#
using System;
|
|
using System.Linq;
|
|
using Mono.Cecil.Cil;
|
|
using CPU = Indy.IL2CPU.Assembler.X86;
|
|
|
|
namespace Indy.IL2CPU.IL.X86 {
|
|
[OpCode(Code.Ldc_R4)]
|
|
public class Ldc_R4: Op {
|
|
private Single mValue;
|
|
public Ldc_R4(Mono.Cecil.Cil.Instruction aInstruction, MethodInformation aMethodInfo)
|
|
: base(aInstruction, aMethodInfo) {
|
|
mValue = (Single)aInstruction.Operand;
|
|
}
|
|
public override void DoAssemble() {
|
|
Pushd(4, "0" + BitConverter.GetBytes(mValue).Aggregate("", (x, b) => x + b.ToString("X2")) + "h");
|
|
}
|
|
}
|
|
} |