Skip to content

Commit f492437

Browse files
committed
update
1 parent 89ce580 commit f492437

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/smack/Prelude.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -1591,10 +1591,13 @@ void FpOpGen::generateConvOps(std::stringstream &s) const {
15911591
auto exp = FP_LAYOUT.at(bw).first;
15921592
auto sig = FP_LAYOUT.at(bw).second;
15931593
std::string type = getFpTypeName(bw);
1594-
s << uninterpretedOp("$fpext", {type, "float"}, makeFpVars(1, 0), "float") << "\n";
1595-
s << uninterpretedOp("$fptrunc", {type, "float"}, makeFpVars(1, 0), "float") << "\n";
1596-
s << uninterpretedOp("$fpext", {"float", type}, makeFpVars(1, 0), type) << "\n";
1597-
s << uninterpretedOp("$fptrunc", {"float", type}, makeFpVars(1, 0), type) << "\n";
1594+
std::list<Binding> bs = makeFpVars(1, srcBw);
1595+
1596+
bs.insert(bs.begin(), {makeRMODEVarName(), getRMODETypeName()});
1597+
s << uninterpretedOp("$fpext", {type, "float"}, bs, "float") << "\n";
1598+
s << uninterpretedOp("$fptrunc", {type, "float"}, bs, "float") << "\n";
1599+
s << uninterpretedOp("$fpext", {"float", type}, bs, type) << "\n";
1600+
s << uninterpretedOp("$fptrunc", {"float", type}, bs, type) << "\n";
15981601
}
15991602
}
16001603
}

0 commit comments

Comments
 (0)