aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2013-07-18 08:53:14 +0200
committerMike Pall <mike>2013-07-18 08:53:14 +0200
commitc86f47aba587e4b8eeeba29fb572601cbb7982fd (patch)
tree86267f0a0bc37a8b94e3274118876dca6cf25988
parent1ddf5689b5cb84b0fc500c2d0e32fadda7e8838b (diff)
parentec96d8b494f0fa87cb8a31a38e7c9241f4f414d3 (diff)
downloadluajit-c86f47aba587e4b8eeeba29fb572601cbb7982fd.tar.gz
luajit-c86f47aba587e4b8eeeba29fb572601cbb7982fd.tar.bz2
luajit-c86f47aba587e4b8eeeba29fb572601cbb7982fd.zip
Merge branch 'master' into v2.1
-rw-r--r--dynasm/dasm_x86.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/dynasm/dasm_x86.lua b/dynasm/dasm_x86.lua
index 07ddd98d..824c6343 100644
--- a/dynasm/dasm_x86.lua
+++ b/dynasm/dasm_x86.lua
@@ -1678,7 +1678,7 @@ if x64 then
1678 function map_op.mov64_2(params) 1678 function map_op.mov64_2(params)
1679 if not params then return { "reg, imm", "reg, [disp]", "[disp], reg" } end 1679 if not params then return { "reg, imm", "reg, [disp]", "[disp], reg" } end
1680 if secpos+2 > maxsecpos then wflush() end 1680 if secpos+2 > maxsecpos then wflush() end
1681 local opcode, op64, sz, rex 1681 local opcode, op64, sz, rex, vreg
1682 local op64 = match(params[1], "^%[%s*(.-)%s*%]$") 1682 local op64 = match(params[1], "^%[%s*(.-)%s*%]$")
1683 if op64 then 1683 if op64 then
1684 local a = parseoperand(params[2]) 1684 local a = parseoperand(params[2])
@@ -1699,11 +1699,17 @@ if x64 then
1699 werror("bad operand mode") 1699 werror("bad operand mode")
1700 end 1700 end
1701 op64 = params[2] 1701 op64 = params[2]
1702 opcode = 0xb8 + band(a.reg, 7) -- !x64: no VREG support. 1702 if a.reg == -1 then
1703 vreg = a.vreg
1704 opcode = 0xb8
1705 else
1706 opcode = 0xb8 + band(a.reg, 7)
1707 end
1703 rex = a.reg > 7 and 9 or 8 1708 rex = a.reg > 7 and 9 or 8
1704 end 1709 end
1705 end 1710 end
1706 wputop(sz, opcode, rex) 1711 wputop(sz, opcode, rex)
1712 if vreg then waction("VREG", vreg); wputxb(0) end
1707 waction("IMM_D", format("(unsigned int)(%s)", op64)) 1713 waction("IMM_D", format("(unsigned int)(%s)", op64))
1708 waction("IMM_D", format("(unsigned int)((%s)>>32)", op64)) 1714 waction("IMM_D", format("(unsigned int)((%s)>>32)", op64))
1709 end 1715 end