public LIRImm(double val) : this() { ImmType = LIRValueType.Double; DoubleValue = val; }
public LIRImm(ulong val) : this() { ImmType = LIRValueType.Int64; ULongValue = val; }
public LIRImm(float val) : this() { ImmType = LIRValueType.Single; FloatValue = val; }
public LIRImm(uint val) : this() { ImmType = LIRValueType.Int32; UIntValue = val; }
public LIRImm(ushort val) : this() { ImmType = LIRValueType.Int16; UShortValue = val; }
public LIRImm(byte val) : this() { ImmType = LIRValueType.Int8; ByteValue = val; }
public static LIRType GetLIRType(LIRValueType tp, bool signed = false) { return LocateLIRType(new LIRType(tp, signed)); }
private LIRType(LIRValueType tp, bool signed = false) { this.Type = tp; this.Signed = signed; this.Allocatable = true; switch (tp) { case LIRValueType.Int8: this.Size = 1; break; case LIRValueType.Int16: this.Size = 2; break; case LIRValueType.Int32: this.Size = 4; break; case LIRValueType.Int64: this.Size = 8; break; case LIRValueType.Single: this.Size = 4; this.Signed = true; break; case LIRValueType.Double: this.Size = 8; this.Signed = true; break; case LIRValueType.None: default: throw new ArgumentOutOfRangeException("tp"); } }