mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 03:03:57 +00:00
fixes #1009
This commit is contained in:
@@ -318,7 +318,7 @@ proc opConv*(dest: var TFullReg, src: TFullReg, desttyp, srctyp: PType): bool =
|
||||
of tyFloat..tyFloat64:
|
||||
dest.intVal = system.toInt(src.floatVal)
|
||||
else:
|
||||
dest.intVal = src.intVal and ((1 shl desttyp.size)-1)
|
||||
dest.intVal = src.intVal and ((1 shl (desttyp.size*8))-1)
|
||||
of tyFloat..tyFloat64:
|
||||
if dest.kind != rkFloat:
|
||||
myreset(dest); dest.kind = rkFloat
|
||||
|
||||
@@ -41,7 +41,14 @@ proc codeListing(c: PCtx, result: var string, start=0) =
|
||||
let x = c.code[i]
|
||||
|
||||
let opc = opcode(x)
|
||||
if opc < firstABxInstr:
|
||||
if opc in {opcConv, opcCast}:
|
||||
let y = c.code[i+1]
|
||||
let z = c.code[i+2]
|
||||
result.addf("\t$#\tr$#, r$#, $#, $#", ($opc).substr(3), x.regA, x.regB,
|
||||
c.types[y.regBx-wordExcess].typeToString,
|
||||
c.types[z.regBx-wordExcess].typeToString)
|
||||
inc i, 2
|
||||
elif opc < firstABxInstr:
|
||||
result.addf("\t$#\tr$#, r$#, r$#", ($opc).substr(3), x.regA,
|
||||
x.regB, x.regC)
|
||||
elif opc in relativeJumps:
|
||||
|
||||
Reference in New Issue
Block a user