aboutsummaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/dump.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jit/dump.lua b/src/jit/dump.lua
index 9a722f73..a635af10 100644
--- a/src/jit/dump.lua
+++ b/src/jit/dump.lua
@@ -310,15 +310,17 @@ local function fmtfunc(func, pc)
310 end 310 end
311end 311end
312 312
313local function formatk(tr, idx) 313local function formatk(tr, idx, sn)
314 local k, t, slot = tracek(tr, idx) 314 local k, t, slot = tracek(tr, idx)
315 local tn = type(k) 315 local tn = type(k)
316 local s 316 local s
317 if tn == "number" then 317 if tn == "number" then
318 if k == 2^52+2^51 then 318 if band(sn or 0, 0x30000) ~= 0 then
319 s = band(sn, 0x20000) ~= 0 and "contpc" or "ftsz"
320 elseif k == 2^52+2^51 then
319 s = "bias" 321 s = "bias"
320 else 322 else
321 s = format("%+.14g", k) 323 s = format(0 < k and k < 0x1p-1026 and "%+a" or "%+.14g", k)
322 end 324 end
323 elseif tn == "string" then 325 elseif tn == "string" then
324 s = format(#k > 20 and '"%.20s"~' or '"%s"', gsub(k, "%c", ctlsub)) 326 s = format(#k > 20 and '"%.20s"~' or '"%s"', gsub(k, "%c", ctlsub))
@@ -354,7 +356,7 @@ local function printsnap(tr, snap)
354 n = n + 1 356 n = n + 1
355 local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS 357 local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS
356 if ref < 0 then 358 if ref < 0 then
357 out:write(formatk(tr, ref)) 359 out:write(formatk(tr, ref, sn))
358 elseif band(sn, 0x80000) ~= 0 then -- SNAP_SOFTFPNUM 360 elseif band(sn, 0x80000) ~= 0 then -- SNAP_SOFTFPNUM
359 out:write(colorize(format("%04d/%04d", ref, ref+1), 14)) 361 out:write(colorize(format("%04d/%04d", ref, ref+1), 14))
360 else 362 else