aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Pall <mike>2010-09-09 12:01:29 +0200
committerMike Pall <mike>2010-09-09 12:01:29 +0200
commitfd63b05253f11d7e436c3685827fce9b64725da6 (patch)
tree309dc62115841c0ec35ca92cd2ce4871f8dc6679 /lib
parent8a1af8cf89e5b23d4c7e47dafd0bdba09a3c7e01 (diff)
downloadluajit-fd63b05253f11d7e436c3685827fce9b64725da6.tar.gz
luajit-fd63b05253f11d7e436c3685827fce9b64725da6.tar.bz2
luajit-fd63b05253f11d7e436c3685827fce9b64725da6.zip
Use biased integer constant for TSETM array index.
Diffstat (limited to 'lib')
-rw-r--r--lib/bc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bc.lua b/lib/bc.lua
index 51fc1bd0..78b342f2 100644
--- a/lib/bc.lua
+++ b/lib/bc.lua
@@ -70,8 +70,9 @@ local function bcline(func, pc, prefix)
70 local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128) 70 local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128)
71 local a = band(shr(ins, 8), 0xff) 71 local a = band(shr(ins, 8), 0xff)
72 local oidx = 6*band(ins, 0xff) 72 local oidx = 6*band(ins, 0xff)
73 local op = sub(bcnames, oidx+1, oidx+6)
73 local s = format("%04d %s %-6s %3s ", 74 local s = format("%04d %s %-6s %3s ",
74 pc, prefix or " ", sub(bcnames, oidx+1, oidx+6), ma == 0 and "" or a) 75 pc, prefix or " ", op, ma == 0 and "" or a)
75 local d = shr(ins, 16) 76 local d = shr(ins, 16)
76 if mc == 13*128 then -- BCMjump 77 if mc == 13*128 then -- BCMjump
77 return format("%s=> %04d\n", s, pc+d-0x7fff) 78 return format("%s=> %04d\n", s, pc+d-0x7fff)
@@ -87,6 +88,7 @@ local function bcline(func, pc, prefix)
87 kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub)) 88 kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub))
88 elseif mc == 9*128 then -- BCMnum 89 elseif mc == 9*128 then -- BCMnum
89 kc = funck(func, d) 90 kc = funck(func, d)
91 if op == "TSETM " then kc = kc - 2^52 end
90 elseif mc == 12*128 then -- BCMfunc 92 elseif mc == 12*128 then -- BCMfunc
91 local fi = funcinfo(funck(func, -d-1)) 93 local fi = funcinfo(funck(func, -d-1))
92 if fi.ffid then 94 if fi.ffid then