public UnaryArithInstruction(CodeLocationTag codeLocation, HighSsaRegister dest, NumberUnaryArithOp arithOp, NumberArithType arithType, HighSsaRegister src) : base(codeLocation) { m_dest = dest; m_arithOp = arithOp; m_arithType = arithType; m_src = src; }
public override void ReadHeader(TagRepository rpa, CatalogReader catalog, HighMethodBodyParseContext methodBody, HighCfgNodeHandle[] cfgNodes, List<HighSsaRegister> ssaRegisters, CodeLocationTag baseLocation, bool haveDebugInfo, BinaryReader reader) { m_arithOp = (NumberUnaryArithOp)reader.ReadByte(); if (m_arithOp < 0 || m_arithOp >= NumberUnaryArithOp.NumHighUnaryArithOpTypes) throw new Exception("Invalid unary arithmetic op"); m_arithType = (NumberArithType)reader.ReadByte(); if (m_arithType < 0 || m_arithType >= NumberArithType.NumHighArithTypes) throw new Exception("Invalid arith type"); }
public BranchCompareNumbersInstruction(CodeLocationTag codeLocation, NumberCompareOperation operation, NumberArithType numberType, HighSsaRegister left, HighSsaRegister right, HighCfgNodeHandle trueNode, HighCfgNodeHandle falseNode) : base(codeLocation) { m_operation = operation; m_trueNode = new HighCfgEdge(this, trueNode); m_falseNode = new HighCfgEdge(this, falseNode); m_left = left; m_right = right; m_numberType = numberType; }
public ArithInstruction(CodeLocationTag codeLocation, HighSsaRegister dest, NumberArithOp arithOp, NumberArithType arithType, HighSsaRegister left, HighSsaRegister right, bool checkOverflow) : base(codeLocation) { m_dest = dest; m_arithOp = arithOp; m_arithType = arithType; m_left = left; m_right = right; m_checkOverflow = checkOverflow; }
public CompareNumbersInstruction(CodeLocationTag codeLocation, HighSsaRegister dest, NumberCompareOperation operation, NumberArithType numberType, HighSsaRegister left, HighSsaRegister right, int trueValue, int falseValue) : base(codeLocation) { m_dest = dest; m_operation = operation; m_trueValue = trueValue; m_falseValue = falseValue; m_left = left; m_right = right; m_numberType = numberType; }
public override void ReadHeader(TagRepository rpa, CatalogReader catalog, HighMethodBodyParseContext methodBody, HighCfgNodeHandle[] cfgNodes, List<HighSsaRegister> ssaRegisters, CodeLocationTag baseLocation, bool haveDebugInfo, BinaryReader reader) { m_operation = (NumberCompareOperation)reader.ReadByte(); if (m_operation < 0 || m_operation >= NumberCompareOperation.NumHighCompareTypes) throw new Exception("Invalid compare operation"); m_numberType = (NumberArithType)reader.ReadByte(); if (m_numberType < 0 || m_numberType >= NumberArithType.NumHighArithTypes) throw new Exception("Invalid arithmetic type"); m_trueValue = reader.ReadInt32(); m_falseValue = reader.ReadInt32(); }
private TypeSpecClassTag ExpectedClassForArithType(NumberArithType arithType) { switch (arithType) { case NumberArithType.Float32: return m_float32Type; case NumberArithType.Float64: return m_float64Type; case NumberArithType.Int32: return m_int32Type; case NumberArithType.Int64: return m_int64Type; case NumberArithType.NativeInt: return m_nativeIntType; case NumberArithType.NativeUInt: return m_nativeUIntType; case NumberArithType.UInt32: return m_uint32Type; case NumberArithType.UInt64: return m_uint64Type; default: throw new ArgumentException(); } }