Lines Matching refs:expr
686 local function toint(expr, isqword)
687 local n = tonumber(expr)
690 werror("not an integer number `"..expr.."'")
696 werror("bad integer number `"..expr.."'")
703 local function immexpr(expr)
705 if sub(expr, 1, 1) == "&" then
706 return "iPJ", format("(ptrdiff_t)(%s)", sub(expr,2))
709 local prefix = sub(expr, 1, 2)
712 return "iJ", sub(expr, 3)
716 return "iJ", map_global[sub(expr, 3)]
720 local dir, lnum = match(expr, "^([<>])([1-9])$")
725 local extname = match(expr, "^extern%s+(%S+)$")
731 return "iI", expr
735 local function dispexpr(expr)
736 local disp = expr == "" and 0 or toint(expr)
738 local c, dispt = match(expr, "^([+-])%s*(.+)$")
740 expr = dispt
742 werror("bad displacement expression `"..expr.."'")
755 return expr -- Need to return original signed expression.
759 local function rtexpr(expr)
760 if not expr then return end
761 local tname, ovreg = match(expr, "^([%w_]+):(@[%w_]+)$")
762 local tp = map_type[tname or expr]
767 werror("type `"..(tname or expr).."' needs a register override")
774 return expr, map_reg_num[expr]
781 local expr = param
785 if t.opsize then expr = tailops end
788 local br = match(expr, "^%[%s*(.-)%s*%]$")
866 local imm = toint(expr, isqword)
867 if not imm and sub(expr, 1, 1) == "*" and t.opsize then
868 imm = toint(sub(expr, 2))
886 local reg, tailr = match(expr, "^([@%w_:]+)%s*(.*)$")
914 t.mode, t.imm = immexpr(expr)