mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed sign check on uint64->float
This commit is contained in:
parent
769861d3da
commit
86721ffc20
1 changed files with 1 additions and 1 deletions
|
@ -16589,7 +16589,7 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
vregInfo->mIsExpr = true;
|
||||
vregInfo->mRelTo = mcValue;
|
||||
}
|
||||
else if ((toType->IsFloat()) && (fromType->IsIntable()) && (fromType->mSize == 8))
|
||||
else if ((toType->IsFloat()) && (fromType->IsIntable()) && (fromType->mSize == 8) && (!castedInst->mValSigned))
|
||||
{
|
||||
// uint64 to float - basically, when we are signed then we shift down one bit (so it's unsigned) and then double the result. There's a 1-bit correction factor.
|
||||
AllocInst(BeMCInstKind_Test, mcValue, mcValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue