• Jiong Wang's avatar
    nfp: bpf: relax source operands check · 08859f15
    Jiong Wang authored
    The NFP normally requires the source operands to be difference addressing
    modes, but we should rule out the very special NN_REG_NONE type.
    
    There are instruction that ignores both A/B operands, for example:
    
      local_csr_rd
    
    For these instructions, we might pass the same operand type, NN_REG_NONE,
    for both A/B operands.
    
    NOTE: in current NFP ISA, it is only possible for instructions with
    unrestricted operands to take none operands, but in case there is new and
    similar instructoin in restricted form, they would follow similar rules,
    so swreg_to_restricted is updated as well.
    Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
    Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    08859f15
nfp_asm.c 6.7 KB