• Home
  • Raw
  • Download

Lines Matching refs:vinfo

117 	local vinfo = V[var]
118 assert(vinfo.reg, 'attempt to spill VAR that doesn\'t have an allocated register')
119 vinfo.spill = (var + 1) * ffi.sizeof('uint64_t') -- Index by (variable number) * (register width)
120 emit(BPF.MEM + BPF.STX + BPF.DW, 10, vinfo.reg, -vinfo.spill, 0)
121 vinfo.reg = nil
125 local vinfo = V[var]
127 assert(vinfo.spill, 'attempt to fill register with a VAR that isn\'t spilled')
128 emit(BPF.MEM + BPF.LDX + BPF.DW, reg, 10, -vinfo.spill, 0)
129 vinfo.reg = reg
130 vinfo.spill = nil
175 for _, vinfo in pairs(V) do
178 if vinfo.shadow == var then
179 vinfo.reg = V[var].reg
180 vinfo.shadow = nil
198 local vinfo = V[var]
199 assert(vinfo, 'VAR '..var..' not registered')
200 vinfo.live_to = code.pc-1
201 if (vinfo.reg and not reg) and not vinfo.shadow then return vinfo.reg end
204 local src = vinfo
211 vinfo.spill = src.spill
226 vinfo.const = nil -- The variable is live
229 vinfo.const = nil -- The variable is live
232 vinfo.reg = reg
233 vinfo.shadow = nil
234 vinfo.live_from = code.pc-1
235 vinfo.type = vtype or vinfo.type
246 local function vderef(dst_reg, src_reg, vinfo)
249 …assert(type(vinfo.const) == 'table' and vinfo.const.__dissector, 'cannot dereference a non-pointer…
250 local vtype = vinfo.const.__dissector
257 if not vinfo.source or vinfo.source:find('_or_null', 1, true) then
853 local vinfo = V[b].const
854 if vinfo.__map then -- BPF map read (constant)
856 elseif vinfo.__dissector then
857 assert(vinfo.__dissector, 'NYI: B[D] where B does not have a known element size')
858 local w = ffi.sizeof(vinfo.__dissector)
872 elseif vinfo.__base then
875 emit(BPF.MEM + BPF.ST + const_width[w], 10, 0, -vinfo.__base + (d * w), const)
877 emit(BPF.MEM + BPF.STX + const_width[w], 10, src_reg, -vinfo.__base + (d * w), 0)
882 elseif vinfo and vinfo and V[a].const then
883 vinfo[V[d].const] = V[a].const
890 local vinfo = V[b].const
891 if vinfo.__map then -- BPF map read (constant)
893 elseif vinfo.__dissector then
894 assert(vinfo.__dissector, 'NYI: B[D] where B does not have a known element size')
895 local w = ffi.sizeof(vinfo.__dissector)
914 elseif vinfo.__base then
926 emit(BPF.MEM + BPF.ST + const_width[w], dst_reg, 0, -vinfo.__base, const)
928 emit(BPF.MEM + BPF.STX + const_width[w], dst_reg, src_reg, -vinfo.__base, 0)
933 elseif vinfo and V[d].const and V[a].const then
934 vinfo[V[d].const] = V[a].const
1142 local vinfo = code.seen_null_guard_inverse and Vcomp[var] or V[var]
1143 if vinfo.source then
1144 local pos = vinfo.source:find('_or_null', 1, true)
1146 vinfo.source = vinfo.source:sub(1, pos - 1)