Lines Matching refs:expr
682 local function toint(expr, isqword)
683 local n = tonumber(expr)
686 werror("not an integer number `"..expr.."'")
692 werror("bad integer number `"..expr.."'")
699 local function immexpr(expr)
701 if sub(expr, 1, 1) == "&" then
702 return "iPJ", format("(ptrdiff_t)(%s)", sub(expr,2))
705 local prefix = sub(expr, 1, 2)
708 return "iJ", sub(expr, 3)
712 return "iJ", map_global[sub(expr, 3)]
716 local dir, lnum = match(expr, "^([<>])([1-9])$")
721 local extname = match(expr, "^extern%s+(%S+)$")
727 return "iI", expr
731 local function dispexpr(expr)
732 local disp = expr == "" and 0 or toint(expr)
734 local c, dispt = match(expr, "^([+-])%s*(.+)$")
736 expr = dispt
738 werror("bad displacement expression `"..expr.."'")
751 return expr -- Need to return original signed expression.
755 local function rtexpr(expr)
756 if not expr then return end
757 local tname, ovreg = match(expr, "^([%w_]+):(@[%w_]+)$")
758 local tp = map_type[tname or expr]
763 werror("type `"..(tname or expr).."' needs a register override")
770 return expr, map_reg_num[expr]
777 local expr = param
781 if t.opsize then expr = tailops end
784 local br = match(expr, "^%[%s*(.-)%s*%]$")
862 local imm = toint(expr, isqword)
863 if not imm and sub(expr, 1, 1) == "*" and t.opsize then
864 imm = toint(sub(expr, 2))
882 local reg, tailr = match(expr, "^([@%w_:]+)%s*(.*)$")
910 t.mode, t.imm = immexpr(expr)