Skip to content

Commit 3134359

Browse files
author
Mike Pall
committed
Fix trace exit register dump for some archs.
1 parent ebc3503 commit 3134359

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/jit/dump.lua

+5-2
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,15 @@ end
608608

609609
------------------------------------------------------------------------------
610610

611+
local gpr64 = jit.arch:match("64")
612+
local fprmips32 = jit.arch == "mips" or jit.arch == "mipsel"
613+
611614
-- Dump taken trace exits.
612615
local function dump_texit(tr, ex, ngpr, nfpr, ...)
613616
out:write("---- TRACE ", tr, " exit ", ex, "\n")
614617
if dumpmode.X then
615618
local regs = {...}
616-
if jit.arch:sub(-2) == "64" then
619+
if gpr64 then
617620
for i=1,ngpr do
618621
out:write(format(" %016x", regs[i]))
619622
if i % 4 == 0 then out:write("\n") end
@@ -624,7 +627,7 @@ local function dump_texit(tr, ex, ngpr, nfpr, ...)
624627
if i % 8 == 0 then out:write("\n") end
625628
end
626629
end
627-
if jit.arch == "mips" or jit.arch == "mipsel" then
630+
if fprmips32 then
628631
for i=1,nfpr,2 do
629632
out:write(format(" %+17.14g", regs[ngpr+i]))
630633
if i % 8 == 7 then out:write("\n") end

0 commit comments

Comments
 (0)