Commit bc8c80a8 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: bpf: reorder arguments to emit_ld_field_any()

ld_field instruction has the following format in NFP assembler:

  ld_field[dst, 1000, src, <<24]

reoder parameters to emit_ld_field_any() to make it closer to
the familiar assembler order.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1bdec449
...@@ -402,8 +402,8 @@ __emit_ld_field(struct nfp_prog *nfp_prog, enum shf_sc sc, ...@@ -402,8 +402,8 @@ __emit_ld_field(struct nfp_prog *nfp_prog, enum shf_sc sc,
} }
static void static void
emit_ld_field_any(struct nfp_prog *nfp_prog, enum shf_sc sc, u8 shift, emit_ld_field_any(struct nfp_prog *nfp_prog, swreg dst, u8 bmask, swreg src,
swreg dst, u8 bmask, swreg src, bool zero) enum shf_sc sc, u8 shift, bool zero)
{ {
struct nfp_insn_re_regs reg; struct nfp_insn_re_regs reg;
int err; int err;
...@@ -424,7 +424,7 @@ static void ...@@ -424,7 +424,7 @@ static void
emit_ld_field(struct nfp_prog *nfp_prog, swreg dst, u8 bmask, swreg src, emit_ld_field(struct nfp_prog *nfp_prog, swreg dst, u8 bmask, swreg src,
enum shf_sc sc, u8 shift) enum shf_sc sc, u8 shift)
{ {
emit_ld_field_any(nfp_prog, sc, shift, dst, bmask, src, false); emit_ld_field_any(nfp_prog, dst, bmask, src, sc, shift, false);
} }
static void emit_nop(struct nfp_prog *nfp_prog) static void emit_nop(struct nfp_prog *nfp_prog)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment