aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2021-01-02 21:37:51 +0100
committerMike Pall <mike>2021-01-02 21:37:51 +0100
commit3134359734062604f0554b77fde6812a02c1e2b4 (patch)
treef5a7ffa63074ec8d3bfc175f81fd1549e9934e65
parentebc3503813209e3f46606234b280ef8a7251993c (diff)
downloadluajit-3134359734062604f0554b77fde6812a02c1e2b4.tar.gz
luajit-3134359734062604f0554b77fde6812a02c1e2b4.tar.bz2
luajit-3134359734062604f0554b77fde6812a02c1e2b4.zip
Fix trace exit register dump for some archs.
-rw-r--r--src/jit/dump.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jit/dump.lua b/src/jit/dump.lua
index f97aa6ed..5105df8a 100644
--- a/src/jit/dump.lua
+++ b/src/jit/dump.lua
@@ -608,12 +608,15 @@ end
608 608
609------------------------------------------------------------------------------ 609------------------------------------------------------------------------------
610 610
611local gpr64 = jit.arch:match("64")
612local fprmips32 = jit.arch == "mips" or jit.arch == "mipsel"
613
611-- Dump taken trace exits. 614-- Dump taken trace exits.
612local function dump_texit(tr, ex, ngpr, nfpr, ...) 615local function dump_texit(tr, ex, ngpr, nfpr, ...)
613 out:write("---- TRACE ", tr, " exit ", ex, "\n") 616 out:write("---- TRACE ", tr, " exit ", ex, "\n")
614 if dumpmode.X then 617 if dumpmode.X then
615 local regs = {...} 618 local regs = {...}
616 if jit.arch:sub(-2) == "64" then 619 if gpr64 then
617 for i=1,ngpr do 620 for i=1,ngpr do
618 out:write(format(" %016x", regs[i])) 621 out:write(format(" %016x", regs[i]))
619 if i % 4 == 0 then out:write("\n") end 622 if i % 4 == 0 then out:write("\n") end
@@ -624,7 +627,7 @@ local function dump_texit(tr, ex, ngpr, nfpr, ...)
624 if i % 8 == 0 then out:write("\n") end 627 if i % 8 == 0 then out:write("\n") end
625 end 628 end
626 end 629 end
627 if jit.arch == "mips" or jit.arch == "mipsel" then 630 if fprmips32 then
628 for i=1,nfpr,2 do 631 for i=1,nfpr,2 do
629 out:write(format(" %+17.14g", regs[ngpr+i])) 632 out:write(format(" %+17.14g", regs[ngpr+i]))
630 if i % 8 == 7 then out:write("\n") end 633 if i % 8 == 7 then out:write("\n") end