Skip to content

Commit 61253c9

Browse files
committed
update
1 parent a511be6 commit 61253c9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/smack/Prelude.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,18 @@ void FpOpGen::generateConvOps(std::stringstream &s) const {
15841584
desType)
15851585
<< "\n";
15861586
}
1587+
// Conversion between bv-floating types and float
1588+
for (auto bw : FP_BIT_WIDTHS) {
1589+
for (auto name : {"$fpext", "$fptrunc"}) {
1590+
auto exp = FP_LAYOUT.at(bw).first;
1591+
auto sig = FP_LAYOUT.at(bw).second;
1592+
std::string type = getFpTypeName(bw);
1593+
s << uninterpretedOp("$fpext", {type, name}, makeFpVars(1, 0), name) << "\n";
1594+
s << uninterpretedOp("$fptrunc", {type, name}, makeFpVars(1, 0), desType) << "\n";
1595+
s << uninterpretedOp("$fpext", {name, type}, makeFpVars(1, 0), type) << "\n";
1596+
s << uninterpretedOp("$fptrunc", {name, type}, makeFpVars(1, 0), type) << "\n";
1597+
}
1598+
}
15871599
}
15881600

15891601
struct FpOpGen::FpIntConv {

0 commit comments

Comments
 (0)