aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
authorMike Pall <mike>2010-09-14 00:00:31 +0200
committerMike Pall <mike>2010-09-14 00:00:31 +0200
commita36287b218b11e5f6c98976881f7e1e9215b6428 (patch)
treef88d3559f13511b740ff3b834a71a126d23c5039 /dynasm
parent3d17f71968e7cd768626064b56fa7794386b99e7 (diff)
downloadluajit-a36287b218b11e5f6c98976881f7e1e9215b6428.tar.gz
luajit-a36287b218b11e5f6c98976881f7e1e9215b6428.tar.bz2
luajit-a36287b218b11e5f6c98976881f7e1e9215b6428.zip
PPC: Add better diagnostics to DynASM for reg/imm mismatches.
Diffstat (limited to 'dynasm')
-rw-r--r--dynasm/dasm_ppc.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/dynasm/dasm_ppc.lua b/dynasm/dasm_ppc.lua
index 0511a4b5..15c1a989 100644
--- a/dynasm/dasm_ppc.lua
+++ b/dynasm/dasm_ppc.lua
@@ -849,7 +849,7 @@ end
849------------------------------------------------------------------------------ 849------------------------------------------------------------------------------
850 850
851local function parse_gpr(expr) 851local function parse_gpr(expr)
852 local tname, ovreg = match(expr, "^([%w_]+):(r[0-9][0-9]?)$") 852 local tname, ovreg = match(expr, "^([%w_]+):(r[1-3]?[0-9])$")
853 local tp = map_type[tname or expr] 853 local tp = map_type[tname or expr]
854 if tp then 854 if tp then
855 local reg = ovreg or tp.reg 855 local reg = ovreg or tp.reg
@@ -907,6 +907,9 @@ local function parse_imm(imm, bits, shift, scale, signed)
907 end 907 end
908 end 908 end
909 werror("out of range immediate `"..imm.."'") 909 werror("out of range immediate `"..imm.."'")
910 elseif match(imm, "^r([1-3]?[0-9])$") or
911 match(imm, "^([%w_]+):(r[1-3]?[0-9])$") then
912 werror("expected immediate operand, got register")
910 else 913 else
911 waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm) 914 waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm)
912 return 0 915 return 0