mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-17 15:38:40 +00:00
Initialize the only-used-with-PPC-double-double parts of the APFloat class. This
makes valgrind stop complaining about uninitialized variables being read when it accesses a bitfield (category) that shares its bits with these variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a4584b54b
commit
f09a8b533d
@ -726,7 +726,7 @@ APFloat::bitwiseIsEqual(const APFloat &rhs) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)
|
APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)
|
||||||
{
|
: exponent2(0), sign2(0) {
|
||||||
assertArithmeticOK(ourSemantics);
|
assertArithmeticOK(ourSemantics);
|
||||||
initialize(&ourSemantics);
|
initialize(&ourSemantics);
|
||||||
sign = 0;
|
sign = 0;
|
||||||
@ -736,14 +736,15 @@ APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)
|
|||||||
normalize(rmNearestTiesToEven, lfExactlyZero);
|
normalize(rmNearestTiesToEven, lfExactlyZero);
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const fltSemantics &ourSemantics) {
|
APFloat::APFloat(const fltSemantics &ourSemantics) : exponent2(0), sign2(0) {
|
||||||
assertArithmeticOK(ourSemantics);
|
assertArithmeticOK(ourSemantics);
|
||||||
initialize(&ourSemantics);
|
initialize(&ourSemantics);
|
||||||
category = fcZero;
|
category = fcZero;
|
||||||
sign = false;
|
sign = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag) {
|
APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag)
|
||||||
|
: exponent2(0), sign2(0) {
|
||||||
assertArithmeticOK(ourSemantics);
|
assertArithmeticOK(ourSemantics);
|
||||||
// Allocates storage if necessary but does not initialize it.
|
// Allocates storage if necessary but does not initialize it.
|
||||||
initialize(&ourSemantics);
|
initialize(&ourSemantics);
|
||||||
@ -751,7 +752,7 @@ APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag) {
|
|||||||
|
|
||||||
APFloat::APFloat(const fltSemantics &ourSemantics,
|
APFloat::APFloat(const fltSemantics &ourSemantics,
|
||||||
fltCategory ourCategory, bool negative)
|
fltCategory ourCategory, bool negative)
|
||||||
{
|
: exponent2(0), sign2(0) {
|
||||||
assertArithmeticOK(ourSemantics);
|
assertArithmeticOK(ourSemantics);
|
||||||
initialize(&ourSemantics);
|
initialize(&ourSemantics);
|
||||||
category = ourCategory;
|
category = ourCategory;
|
||||||
@ -763,14 +764,13 @@ APFloat::APFloat(const fltSemantics &ourSemantics,
|
|||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text)
|
APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text)
|
||||||
{
|
: exponent2(0), sign2(0) {
|
||||||
assertArithmeticOK(ourSemantics);
|
assertArithmeticOK(ourSemantics);
|
||||||
initialize(&ourSemantics);
|
initialize(&ourSemantics);
|
||||||
convertFromString(text, rmNearestTiesToEven);
|
convertFromString(text, rmNearestTiesToEven);
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const APFloat &rhs)
|
APFloat::APFloat(const APFloat &rhs) : exponent2(0), sign2(0) {
|
||||||
{
|
|
||||||
initialize(rhs.semantics);
|
initialize(rhs.semantics);
|
||||||
assign(rhs);
|
assign(rhs);
|
||||||
}
|
}
|
||||||
@ -3257,18 +3257,15 @@ APFloat APFloat::getSmallestNormalized(const fltSemantics &Sem, bool Negative) {
|
|||||||
return Val;
|
return Val;
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(const APInt& api, bool isIEEE)
|
APFloat::APFloat(const APInt& api, bool isIEEE) : exponent2(0), sign2(0) {
|
||||||
{
|
|
||||||
initFromAPInt(api, isIEEE);
|
initFromAPInt(api, isIEEE);
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(float f)
|
APFloat::APFloat(float f) : exponent2(0), sign2(0) {
|
||||||
{
|
|
||||||
initFromAPInt(APInt::floatToBits(f));
|
initFromAPInt(APInt::floatToBits(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
APFloat::APFloat(double d)
|
APFloat::APFloat(double d) : exponent2(0), sign2(0) {
|
||||||
{
|
|
||||||
initFromAPInt(APInt::doubleToBits(d));
|
initFromAPInt(APInt::doubleToBits(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user