Lines Matching refs:expr
696 local function toint(expr)
697 local n = tonumber(expr)
700 werror("bad integer number `"..expr.."'")
707 local function immexpr(expr)
709 if sub(expr, 1, 1) == "&" then
710 return "iPJ", format("(ptrdiff_t)(%s)", sub(expr,2))
713 local prefix = sub(expr, 1, 2)
716 return "iJ", sub(expr, 3)
720 return "iJ", map_global[sub(expr, 3)]
724 local dir, lnum = match(expr, "^([<>])([1-9])$")
729 local extname = match(expr, "^extern%s+(%S+)$")
735 return "iI", expr
739 local function dispexpr(expr)
740 local disp = expr == "" and 0 or toint(expr)
742 local c, dispt = match(expr, "^([+-])%s*(.+)$")
744 expr = dispt
746 werror("bad displacement expression `"..expr.."'")
759 return expr -- Need to return original signed expression.
763 local function rtexpr(expr)
764 if not expr then return end
765 local tname, ovreg = match(expr, "^([%w_]+):(@[%w_]+)$")
766 local tp = map_type[tname or expr]
771 werror("type `"..(tname or expr).."' needs a register override")
778 return expr, map_reg_num[expr]
785 local expr = param
789 if t.opsize then expr = tailops end
792 local br = match(expr, "^%[%s*(.-)%s*%]$")
870 local imm = toint(expr)
871 if not imm and sub(expr, 1, 1) == "*" and t.opsize then
872 imm = toint(sub(expr, 2))
890 local reg, tailr = match(expr, "^([@%w_:]+)%s*(.*)$")
918 t.mode, t.imm = immexpr(expr)