svf-lib 1.0.2174 → 1.0.2175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +35 -0
- package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +4 -4
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -52,6 +52,41 @@ inline bool isCallSite(const Value* val)
|
|
|
52
52
|
return SVFUtil::isa<CallBase>(val);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
inline double getDoubleValue(const ConstantFP* fpValue)
|
|
56
|
+
{
|
|
57
|
+
double dval = 0;
|
|
58
|
+
if (fpValue->isNormalFP())
|
|
59
|
+
{
|
|
60
|
+
const llvm::fltSemantics& semantics = fpValue->getValueAPF().getSemantics();
|
|
61
|
+
if (&semantics == &llvm::APFloat::IEEEhalf() ||
|
|
62
|
+
&semantics == &llvm::APFloat::IEEEsingle() ||
|
|
63
|
+
&semantics == &llvm::APFloat::IEEEdouble() ||
|
|
64
|
+
&semantics == &llvm::APFloat::IEEEquad() ||
|
|
65
|
+
&semantics == &llvm::APFloat::x87DoubleExtended())
|
|
66
|
+
{
|
|
67
|
+
dval = fpValue->getValueAPF().convertToDouble();
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
{
|
|
71
|
+
assert (false && "Unsupported floating point type");
|
|
72
|
+
abort();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
{
|
|
77
|
+
// other cfp type, like isZero(), isInfinity(), isNegative(), etc.
|
|
78
|
+
// do nothing
|
|
79
|
+
}
|
|
80
|
+
return dval;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
inline std::pair<s64_t, u64_t> getIntegerValue(const ConstantInt* intValue)
|
|
84
|
+
{
|
|
85
|
+
if (intValue->getBitWidth() <= 64 && intValue->getBitWidth() >= 1)
|
|
86
|
+
return std::make_pair(intValue->getSExtValue(), intValue->getZExtValue());
|
|
87
|
+
else
|
|
88
|
+
return std::make_pair(0,0);
|
|
89
|
+
}
|
|
55
90
|
|
|
56
91
|
/// Return LLVM callsite given a value
|
|
57
92
|
inline const CallBase* getLLVMCallSite(const Value* value)
|
|
@@ -585,10 +585,10 @@ private:
|
|
|
585
585
|
return addNode(node, i);
|
|
586
586
|
}
|
|
587
587
|
|
|
588
|
-
inline NodeID addConstantIntValNode(const SVFValue* curInst, s64_t
|
|
588
|
+
inline NodeID addConstantIntValNode(const SVFValue* curInst, const std::pair<s64_t, u64_t>& intValue, const NodeID i,
|
|
589
589
|
const ICFGNode* icfgNode)
|
|
590
590
|
{
|
|
591
|
-
SVFVar* node = new ConstantIntValVar(curInst,
|
|
591
|
+
SVFVar* node = new ConstantIntValVar(curInst, intValue.first, intValue.second, i, icfgNode);
|
|
592
592
|
return addNode(node, i);
|
|
593
593
|
}
|
|
594
594
|
|
|
@@ -656,13 +656,13 @@ private:
|
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
|
|
659
|
-
inline NodeID addConstantIntObjNode(const SVFValue* curInst, s64_t
|
|
659
|
+
inline NodeID addConstantIntObjNode(const SVFValue* curInst, const std::pair<s64_t, u64_t>& intValue, const NodeID i)
|
|
660
660
|
{
|
|
661
661
|
const MemObj* mem = getMemObj(curInst);
|
|
662
662
|
NodeID base = mem->getId();
|
|
663
663
|
memToFieldsMap[base].set(mem->getId());
|
|
664
664
|
ConstantIntObjVar* node =
|
|
665
|
-
new ConstantIntObjVar(curInst,
|
|
665
|
+
new ConstantIntObjVar(curInst, intValue.first, intValue.second, mem->getId(), mem);
|
|
666
666
|
return addObjNode(curInst, node, mem->getId());
|
|
667
667
|
}
|
|
668
668
|
|
|
Binary file
|
|
Binary file
|