Fix to int to biggest int (#12066)

* fix to(Biggest)Int
* kill toFloat magics as well
This commit is contained in:
Arne Döring 2019-08-27 23:18:46 +02:00 • committed by Andreas Rumpf
commit d564130a3b
10 changed files with 43 additions and 64 deletions

View file

@ -1058,8 +1058,7 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
let t = skipTypes(n.typ, abstractVar-{tyTypeDesc})
if t.kind in {tyUInt8..tyUInt32} or (t.kind == tyUInt and t.size < 8):
c.gABC(n, opcNarrowU, dest, TRegister(t.size*8))
of mToFloat, mToBiggestFloat, mToInt,
mToBiggestInt, mCharToStr, mBoolToStr, mIntToStr, mInt64ToStr,
of mCharToStr, mBoolToStr, mIntToStr, mInt64ToStr,
mFloatToStr, mCStrToStr, mStrToStr, mEnumToStr:
genConv(c, n, n.sons[1], dest)
of mEqStr, mEqCString: genBinaryABC(c, n, dest, opcEqStr)