aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Pall <mike>2010-02-24 01:18:49 +0100
committerMike Pall <mike>2010-02-24 01:18:49 +0100
commit857f538eacdb2c45913cd8c32f3c0d8a6f273f50 (patch)
treec67a6d4c8ae617dad442daba6bdad4263c605058 /lib
parent8ae2f9feaaed874e01a87df6646242b80acceabb (diff)
downloadluajit-857f538eacdb2c45913cd8c32f3c0d8a6f273f50.tar.gz
luajit-857f538eacdb2c45913cd8c32f3c0d8a6f273f50.tar.bz2
luajit-857f538eacdb2c45913cd8c32f3c0d8a6f273f50.zip
Fix exit state for 64 bit mode.
Diffstat (limited to 'lib')
-rw-r--r--lib/dump.lua29
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/dump.lua b/lib/dump.lua
index ccd43d72..39de30d0 100644
--- a/lib/dump.lua
+++ b/lib/dump.lua
@@ -306,10 +306,18 @@ local function dump_snap(tr)
306end 306end
307 307
308-- NYI: should really get the register map from the disassembler. 308-- NYI: should really get the register map from the disassembler.
309local reg_map = { 309local reg_map = ({
310 [0] = "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", 310 x86 = {
311 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", 311 [0] = "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
312} 312 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
313 },
314 x64 = {
315 [0] = "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
316 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
317 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
318 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15",
319 }
320})[jit.arch]
313 321
314-- Return a register name or stack slot for a rid/sp location. 322-- Return a register name or stack slot for a rid/sp location.
315local function ridsp_name(ridsp) 323local function ridsp_name(ridsp)
@@ -508,9 +516,16 @@ local function dump_texit(tr, ex, ngpr, nfpr, ...)
508 out:write("---- TRACE ", tr, " exit ", ex, "\n") 516 out:write("---- TRACE ", tr, " exit ", ex, "\n")
509 if dumpmode.X then 517 if dumpmode.X then
510 local regs = {...} 518 local regs = {...}
511 for i=1,ngpr do 519 if jit.arch == "x64" then
512 out:write(format(" %08x", regs[i])) 520 for i=1,ngpr do
513 if i % 8 == 0 then out:write("\n") end 521 out:write(format(" %016x", regs[i]))
522 if i % 4 == 0 then out:write("\n") end
523 end
524 else
525 for i=1,ngpr do
526 out:write(format(" %08x", regs[i]))
527 if i % 8 == 0 then out:write("\n") end
528 end
514 end 529 end
515 for i=1,nfpr do 530 for i=1,nfpr do
516 out:write(format(" %+17.14g", regs[ngpr+i])) 531 out:write(format(" %+17.14g", regs[ngpr+i]))