public ComparisonBlock( LLVMCodeGenerator CodeGenerator, CodeBlock Left, CodeBlock Right, LLVMIntPredicate Predicate) { this.codeGen = CodeGenerator; this.lhs = Left; this.rhs = Right; this.predicate = Predicate; }
/// <summary> /// Handles IntPtr comparisons. /// </summary> /// <param name="context">The current invocation context.</param> /// <param name="predicate">The comparison predicate.</param> /// <returns>The resulting value.</returns> protected virtual Value?MakeIntPtrCompare(InvocationContext context, LLVMIntPredicate predicate) { var builder = context.Builder; var args = context.GetArgs(); var firstVal = BuildPtrToInt(builder, args[0].LLVMValue, Unit.NativeIntPtrType, string.Empty); var secondVal = BuildPtrToInt(builder, args[1].LLVMValue, Unit.NativeIntPtrType, string.Empty); return(new Value( typeof(bool), BuildICmp(builder, predicate, firstVal, secondVal, string.Empty))); }
public static extern LLVMValueRef* BuildICmp(LLVMBuilderRef* LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef* LHS, LLVMValueRef* RHS, [In][MarshalAs(UnmanagedType.LPStr)] string Name);
public static extern LLVMValueRef* ConstICmp(LLVMIntPredicate Predicate, LLVMValueRef* LHSConstant, LLVMValueRef* RHSConstant);
public LLVMValueRef CompareInts(LLVMIntPredicate op, LLVMValueRef v1, LLVMValueRef v2) { return(LLVM.BuildICmp(_codeGenerator.Builder, op, v1, v2, "")); }
public static extern LLVMValueRef ConstICmp(LLVMIntPredicate @Predicate, LLVMValueRef @LHSConstant, LLVMValueRef @RHSConstant);
public static extern LLVMValueRef BuildICmp(LLVMBuilderRef @param0, LLVMIntPredicate @Op, LLVMValueRef @LHS, LLVMValueRef @RHS, [MarshalAs(UnmanagedType.LPStr)] string @Name);
public Value BuildICmp(Value lhs, LLVMIntPredicate predicate, Value rhs, string varName = tmpvarname) { return new Value(Native.BuildICmp(m_builder, predicate, lhs.Handle, rhs.Handle, varName)); }
public LLVMValueRef CreateICmp(LLVMIntPredicate @Op, LLVMValueRef @LHS, LLVMValueRef @RHS, string @Name) { return LLVM.BuildICmp(this.instance, @Op, @LHS, @RHS, @Name); }
public static ConstantExpr GetICmp(LLVMIntPredicate predicate, Constant lhs, Constant rhs) => LLVM.ConstICmp(predicate, lhs.Unwrap(), rhs.Unwrap()).WrapAs <ConstantExpr>();
public Value BuildICmp(Value lhs, LLVMIntPredicate predicate, Value rhs, string varName = tmpvarname) { return(new Value(Native.BuildICmp(m_builder, predicate, lhs.Handle, rhs.Handle, varName))); }
public static IntPredicate Wrap(this LLVMIntPredicate handle) => (IntPredicate)(int)handle;
private OperatorSymbol binary(Tag tag, TypeTag left, TypeTag right, TypeTag result, LLVMOpcode opcode, LLVMIntPredicate intPredicate) { return(binary(tag, left, right, result, opcode, (int)intPredicate)); }
public Value BuildICmp(Value lhs, LLVMIntPredicate predicate, Value rhs) { return BuildICmp(lhs, predicate, rhs, "cmptmp"); }
public LLVMValueRef CreateICmp(LLVMIntPredicate @Op, LLVMValueRef @LHS, LLVMValueRef @RHS, string @Name) { return(LLVM.BuildICmp(this.instance, @Op, @LHS, @RHS, @Name)); }