Skip to content

Commit

Permalink
Extend offline for new prims
Browse files Browse the repository at this point in the history
  • Loading branch information
ncough committed Jan 17, 2025
1 parent da42348 commit c6c51f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ class llvm_run_time_interface : virtual public lifter_interface<llvm_lifter_trai
rt_expr f_gen_FPRecpX(rt_expr x, rt_expr fpcr) override { assert(0); }
rt_expr f_gen_FPSqrt(rt_expr x, rt_expr fpcr) override { assert(0); }
rt_expr f_gen_FPRecipEstimate(rt_expr x, rt_expr fpcr) override { assert(0); }
rt_expr f_gen_UnsignedRSqrtEstimate(rt_expr x) override { assert(0); }
rt_expr f_gen_FPRSqrtEstimate(rt_expr x, rt_expr fpcr) override { assert(0); }
rt_expr f_gen_BFAdd(rt_expr x, rt_expr y) override { assert(0); }
rt_expr f_gen_BFMul(rt_expr x, rt_expr y) override { assert(0); }
rt_expr f_gen_FPConvertBF(rt_expr x, rt_expr fpcr, rt_expr rounding) override { assert(0); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ template <typename Traits> class lifter_interface : public Traits {
virtual rt_expr f_gen_FPRecpX(rt_expr x, rt_expr fpcr) = 0;
virtual rt_expr f_gen_FPSqrt(rt_expr x, rt_expr fpcr) = 0;
virtual rt_expr f_gen_FPRecipEstimate(rt_expr x, rt_expr fpcr) = 0;
virtual rt_expr f_gen_UnsignedRSqrtEstimate(rt_expr x) = 0;
virtual rt_expr f_gen_FPRSqrtEstimate(rt_expr x, rt_expr fpcr) = 0;
virtual rt_expr f_gen_BFAdd(rt_expr x, rt_expr y) = 0;
virtual rt_expr f_gen_BFMul(rt_expr x, rt_expr y) = 0;
virtual rt_expr f_gen_FPConvertBF(rt_expr x, rt_expr fpcr,
Expand Down
2 changes: 2 additions & 0 deletions offlineASL-scala/lifter/src/interface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ trait LiftState[RTSym, RTLabel, BV <: RTSym] {
def f_gen_FPMulX(targ0: BigInt, arg0: RTSym, arg1: RTSym, arg2: RTSym): RTSym
def f_gen_FPRSqrtStepFused(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym
def f_gen_FPRecipEstimate(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym
def f_gen_UnsignedRSqrtEstimate(targ0: BigInt, arg0: RTSym): RTSym
def f_gen_FPRSqrtEstimate(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym
def f_gen_FPRecipStepFused(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym
def f_gen_FPRecpX(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym
def f_gen_FPRoundInt(targ0: BigInt, arg0: RTSym, arg1: RTSym, arg2: RTSym, arg3: RTSym): RTSym
Expand Down
2 changes: 2 additions & 0 deletions offlineASL-scala/main/src/NoneLifter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class NotImplementedLifter extends LiftState[RExpr, String, BitVec] {
def f_gen_FPMulX(targ0: BigInt, arg0: RTSym, arg1: RTSym, arg2: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRSqrtStepFused(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRecipEstimate(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym = throw NotImplementedError()
def f_gen_UnsignedRSqrtEstimate(targ0: BigInt, arg0: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRSqrtEstimate(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRecipStepFused(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRecpX(targ0: BigInt, arg0: RTSym, arg1: RTSym): RTSym = throw NotImplementedError()
def f_gen_FPRoundInt(targ0: BigInt, arg0: RTSym, arg1: RTSym, arg2: RTSym, arg3: RTSym): RTSym = throw NotImplementedError()
Expand Down
4 changes: 4 additions & 0 deletions offlineASL/offline_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ let f_gen_FPSqrt w x t =
Expr_TApply (FIdent ("FPSqrt", 0), [expr_of_z w], [x; t])
let f_gen_FPRecipEstimate w x r =
Expr_TApply (FIdent ("FPRecipEstimate", 0), [expr_of_z w], [x; r])
let f_gen_UnsignedRSqrtEstimate w x =
Expr_TApply (FIdent ("UnsignedRSqrtEstimate", 0), [expr_of_z w], [x])
let f_gen_FPRSqrtEstimate w x r =
Expr_TApply (FIdent ("FPRSqrtEstimate", 0), [expr_of_z w], [x; r])

let f_gen_BFAdd x y =
Expr_TApply (FIdent ("BFAdd", 0), [], [x; y])
Expand Down

0 comments on commit c6c51f0

Please sign in to comment.