mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 03:36:43 +00:00
Bitcast all the bits of a floating point value, not just one. The zero
extension is needed because the constructor for the Destination value causes the APInt to have a bit width of 1. Patch by Guoling Han. llvm-svn: 36733
This commit is contained in:
parent
4a38716edd
commit
68ab99ffb6
@ -1087,8 +1087,10 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy,
|
||||
Dest.PointerVal = Src.PointerVal;
|
||||
} else if (DstTy->isInteger()) {
|
||||
if (SrcTy == Type::FloatTy) {
|
||||
Dest.IntVal.zext(sizeof(Src.FloatVal) * 8);
|
||||
Dest.IntVal.floatToBits(Src.FloatVal);
|
||||
} else if (SrcTy == Type::DoubleTy) {
|
||||
Dest.IntVal.zext(sizeof(Src.DoubleVal) * 8);
|
||||
Dest.IntVal.doubleToBits(Src.DoubleVal);
|
||||
} else if (SrcTy->isInteger()) {
|
||||
Dest.IntVal = Src.IntVal;
|
||||
|
Loading…
x
Reference in New Issue
Block a user