Example #1
0
		public LIRImm(double val) : this() { ImmType = LIRValueType.Double; DoubleValue = val; }
Example #2
0
		public LIRImm(ulong val) : this() { ImmType = LIRValueType.Int64; ULongValue = val; }
Example #3
0
		public LIRImm(float val) : this() { ImmType = LIRValueType.Single; FloatValue = val; }
Example #4
0
		public LIRImm(uint val) : this() { ImmType = LIRValueType.Int32; UIntValue = val; }
Example #5
0
		public LIRImm(ushort val) : this() { ImmType = LIRValueType.Int16; UShortValue = val; }
Example #6
0
		public LIRImm(byte val) : this() { ImmType = LIRValueType.Int8; ByteValue = val; }
Example #7
0
		public static LIRType GetLIRType(LIRValueType tp, bool signed = false) { return LocateLIRType(new LIRType(tp, signed)); }
Example #8
0
		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");
			}
		}