FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
asm_mips.h File Reference

Go to the source code of this file.

Macros

#define mips_foreach_opcode
 
#define mips_foreach_special_funct
 
#define mips_foreach_special2_funct
 
#define mips_foreach_regimm_rt
 
#define mips_foreach_cop0_rs
 
#define mips_foreach_cop0_funct
 
#define mips_foreach_cop1_rs
 
#define mips_foreach_cop1_funct
 
#define mips_foreach_cop1x_funct
 
#define mips_foreach_mdmx_funct
 
#define mips_insn_r(op, funct, rd, rs, rt, sa)
 
#define mips_insn_i(op, rs, rt, imm)   mips_insn_encode_i_type (MIPS_OPCODE_##op, (rs), (rt), (imm))
 
#define mips_insn_j(op, target)   mips_insn_encode_i_type (MIPS_OPCODE_##op, (rs), (rt), (imm))
 

Enumerations

enum  mips_insn_opcode_t { mips_foreach_opcode }
 
enum  mips_insn_special_funct_t { mips_foreach_special_funct }
 
enum  mips_insn_special2_funct_t { mips_foreach_special2_funct }
 
enum  mips_insn_regimm_rt_t { mips_foreach_regimm_rt }
 
enum  mips_insn_cop0_rs_t { mips_foreach_cop0_rs }
 
enum  mips_insn_cop0_funct_t { mips_foreach_cop0_funct }
 
enum  mips_insn_cop1_rs_t { mips_foreach_cop1_rs }
 
enum  mips_insn_cop1_funct_t { mips_foreach_cop1_funct }
 
enum  mips_insn_cop1x_funct_t { mips_foreach_cop1x_funct }
 
enum  mips_insn_mdmx_funct_t { mips_foreach_mdmx_funct }
 
enum  mips_reg_t { MIPS_REG_SP = 29, MIPS_REG_RA = 31 }
 

Functions

static mips_insn_opcode_t mips_insn_get_op (u32 insn)
 
static u32 mips_insn_get_rs (u32 insn)
 
static u32 mips_insn_get_rt (u32 insn)
 
static u32 mips_insn_get_rd (u32 insn)
 
static u32 mips_insn_get_sa (u32 insn)
 
static u32 mips_insn_get_funct (u32 insn)
 
static i32 mips_insn_get_immediate (u32 insn)
 
static u32 mips_insn_encode_i_type (int op, int rs, int rt, int immediate)
 
static u32 mips_insn_encode_j_type (int op, u32 addr)
 
static u32 mips_insn_encode_r_type (int op, int rs, int rt, int rd, int sa, int funct)
 
static u32 mips_insn_load (u32 rd, i32 offset, u32 base, u32 log2_bytes)
 

Macro Definition Documentation

◆ mips_foreach_cop0_funct

#define mips_foreach_cop0_funct
Value:
_(o00) _(tlbr) _(tlbwi) _(o03) _(o04) _(o05) _(tlbwr) _(o07) \
_(tlbp) _(o11) _(o12) _(o13) _(o14) _(o15) _(o16) _(o17) \
_(o20) _(o21) _(o22) _(o23) _(o24) _(o25) _(o26) _(o27) \
_(eret) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(deret) \
_(wait) _(o41) _(o42) _(o43) _(o44) _(o45) _(o46) _(o47) \
_(o50) _(o51) _(o52) _(o53) _(o54) _(o55) _(o56) _(o57) \
_(o60) _(o61) _(o62) _(o63) _(o64) _(o65) _(o66) _(o67) \
_(o70) _(o71) _(o72) _(o73) _(o74) _(o75) _(o76) _(o77)

Definition at line 90 of file asm_mips.h.

◆ mips_foreach_cop0_rs

#define mips_foreach_cop0_rs
Value:
_(mfc0) _(dmfc0) _(o02) _(o03) _(mtc0) _(dmtc0) _(o06) _(o07) \
_(o10) _(o11) _(o12) _(o13) _(o14) _(o15) _(o16) _(o17) \
_(C0) _(o21) _(o22) _(o23) _(o24) _(o25) _(o26) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37)

Definition at line 83 of file asm_mips.h.

◆ mips_foreach_cop1_funct

#define mips_foreach_cop1_funct
Value:
_(add) _(sub) _(mul) _(div) _(sqrt) _(abs) _(mov) _(neg) \
_(roundl) _(truncl) _(ceill) _(floorl) _(roundw) _(truncw) _(ceilw) _(floorw) \
_(o20) _(MOVCF) _(movz) _(movn) _(o24) _(recip) _(rsqrt) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37) \
_(cvts) _(cvtd) _(o42) _(o43) _(cvtw) _(cvtl) _(o46) _(o47) \
_(o50) _(o51) _(o52) _(o53) _(o54) _(o55) _(o56) _(o57) \
_(cf) _(cun) _(ceq) _(cueq) _(colt) _(cult) _(cole) _(cule) \
_(csf) _(cngle) _(cseq) _(cngl) _(clt) _(cnge) _(cle) _(cngt)
static f64 sqrt(f64 x)
Definition: math.h:44

Definition at line 108 of file asm_mips.h.

◆ mips_foreach_cop1_rs

#define mips_foreach_cop1_rs
Value:
_(mfc1) _(dmfc1) _(cfc1) _(o03) _(mtc1) _(dmtc1) _(ctc1) _(o07) \
_(BC1) _(o11) _(o12) _(o13) _(o14) _(o15) _(o16) _(o17) \
_(S) _(D) _(o22) _(o23) _(W) _(L) _(o26) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37)
#define S(mp)
#define W(ret)

Definition at line 101 of file asm_mips.h.

◆ mips_foreach_cop1x_funct

#define mips_foreach_cop1x_funct
Value:
_(lwxc1) _(ldxc1) _(o02) _(o03) _(o04) _(luxc1) _(o06) _(o07) \
_(swxc1) _(sdxc1) _(o12) _(o13) _(o14) _(suxc1) _(o16) _(prefx) \
_(o20) _(o21) _(o22) _(o23) _(o24) _(o25) _(o26) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37) \
_(madds) _(maddd) _(o42) _(o43) _(o44) _(o45) _(o46) _(o47) \
_(msubs) _(msubd) _(o52) _(o53) _(o54) _(o55) _(o56) _(o57) \
_(nmadds) _(nmaddd) _(o62) _(o63) _(o64) _(o65) _(o66) _(o67) \
_(nmsubs) _(nmsubd) _(o72) _(o73) _(o74) _(o75) _(o76) _(o77)

Definition at line 119 of file asm_mips.h.

◆ mips_foreach_mdmx_funct

#define mips_foreach_mdmx_funct
Value:
_(msgn) _(ceq) _(pickf) _(pickt) _(clt) _(cle) _(min) _(max) \
_(o10) _(o11) _(sub) _(add) _(and) _(xor) _(or) _(nor) \
_(sll) _(o21) _(srl) _(sra) _(o24) _(o25) _(o26) _(o27) \
_(alniob) _(alnvob) _(alniqh) _(alnvqh) _(o34) _(o35) _(o36) _(shfl) \
_(rzu) _(rnau) _(rneu) _(o43) _(rzs) _(rnas) _(rnes) _(o47) \
_(o50) _(o51) _(o52) _(o53) _(o54) _(o55) _(o56) _(o57) \
_(mul) _(o61) _(muls) _(mula) _(o64) _(o65) _(suba) _(adda) \
_(o70) _(o71) _(o72) _(o73) _(o74) _(o75) _(wac) _(rac)

Definition at line 129 of file asm_mips.h.

◆ mips_foreach_opcode

#define mips_foreach_opcode
Value:
_(SPECIAL) _(REGIMM) _(j) _(jal) _(beq) _(bne) _(blez) _(bgtz) \
_(addi) _(addiu) _(slti) _(sltiu) _(andi) _(ori) _(xori) _(lui) \
_(COP0) _(COP1) _(COP2) _(COP1X) _(beql) _(bnel) _(blezl) _(bgtzl) \
_(daddi) _(daddiu) _(ldl) _(ldr) _(SPECIAL2) _(jalx) _(MDMX) _(O37) \
_(lb) _(lh) _(lwl) _(lw) _(lbu) _(lhu) _(lwr) _(lwu) \
_(sb) _(sh) _(swl) _(sw) _(sdl) _(sdr) _(swr) _(cache) \
_(ll) _(lwc1) _(lwc2) _(pref) _(lld) _(ldc1) _(ldc2) _(ld) \
_(sc) _(swc1) _(swc2) _(o73) _(scd) _(sdc1) _(sdc2) _(sd)

Definition at line 43 of file asm_mips.h.

◆ mips_foreach_regimm_rt

#define mips_foreach_regimm_rt
Value:
_(bltz) _(bgez) _(bltzl) _(bgezl) _(o04) _(o05) _(o06) _(o07) \
_(tgei) _(tgeiu) _(tltiu) _(teqi) _(o14) _(tnei) _(o16) _(o17) \
_(bltzal) _(bgezal) _(bltzall) _(bgezall) _(o24) _(o25) _(o26) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37)

Definition at line 76 of file asm_mips.h.

◆ mips_foreach_special2_funct

#define mips_foreach_special2_funct
Value:
_(madd) _(maddu) _(mul) _(o03) _(msub) _(msubu) _(o06) _(o07) \
_(o10) _(o11) _(o12) _(o13) _(o14) _(o15) _(o16) _(o17) \
_(o20) _(o21) _(o22) _(o23) _(o24) _(o25) _(o26) _(o27) \
_(o30) _(o31) _(o32) _(o33) _(o34) _(o35) _(o36) _(o37) \
_(clz) _(clo) _(o42) _(o43) _(dclz) _(dclo) _(o46) _(o47) \
_(o50) _(o51) _(o52) _(o53) _(o54) _(o55) _(o56) _(o57) \
_(o60) _(o61) _(o62) _(o63) _(o64) _(o65) _(o66) _(o67) \
_(o70) _(o71) _(o72) _(o73) _(o74) _(o75) _(o76) _(sdbbp)

Definition at line 65 of file asm_mips.h.

◆ mips_foreach_special_funct

#define mips_foreach_special_funct
Value:
_(sll) _(MOVCI) _(srl) _(sra) _(sllv) _(o05) _(srlv) _(srav) \
_(jr) _(jalr) _(movz) _(movn) _(syscall) _(break) _(o16) _(sync) \
_(mfhi) _(mthi) _(mflo) _(mtlo) _(dsllv) _(o25) _(dsrlv) _(dsrav) \
_(mult) _(multu) _(div) _(divu) _(dmult) _(dmultu) _(ddiv) _(ddivu) \
_(add) _(addu) _(sub) _(subu) _(and) _(or) _(xor) _(nor) \
_(o50) _(o51) _(slt) _(sltu) _(dadd) _(daddu) _(dsub) _(dsubu) \
_(tge) _(tgeu) _(tlt) _(tltu) _(teq) _(o65) _(tne) _(o67) \
_(dsll) _(o71) _(dsrl) _(dsra) _(dsll32) _(o75) _(dsrl32) _(dsra32)

Definition at line 54 of file asm_mips.h.

◆ mips_insn_i

#define mips_insn_i (   op,
  rs,
  rt,
  imm 
)    mips_insn_encode_i_type (MIPS_OPCODE_##op, (rs), (rt), (imm))

Definition at line 305 of file asm_mips.h.

◆ mips_insn_j

#define mips_insn_j (   op,
  target 
)    mips_insn_encode_i_type (MIPS_OPCODE_##op, (rs), (rt), (imm))

Definition at line 308 of file asm_mips.h.

◆ mips_insn_r

#define mips_insn_r (   op,
  funct,
  rd,
  rs,
  rt,
  sa 
)
Value:
mips_insn_encode_r_type (MIPS_OPCODE_##op, \
(rs), (rt), (rd), (sa), \
MIPS_##op##_FUNCT_##funct)
static u32 mips_insn_encode_r_type(int op, int rs, int rt, int rd, int sa, int funct)
Definition: asm_mips.h:280

Definition at line 300 of file asm_mips.h.

Enumeration Type Documentation

◆ mips_insn_cop0_funct_t

Enumerator
mips_foreach_cop0_funct 

Definition at line 175 of file asm_mips.h.

◆ mips_insn_cop0_rs_t

Enumerator
mips_foreach_cop0_rs 

Definition at line 168 of file asm_mips.h.

◆ mips_insn_cop1_funct_t

Enumerator
mips_foreach_cop1_funct 

Definition at line 189 of file asm_mips.h.

◆ mips_insn_cop1_rs_t

Enumerator
mips_foreach_cop1_rs 

Definition at line 182 of file asm_mips.h.

◆ mips_insn_cop1x_funct_t

Enumerator
mips_foreach_cop1x_funct 

Definition at line 196 of file asm_mips.h.

◆ mips_insn_mdmx_funct_t

Enumerator
mips_foreach_mdmx_funct 

Definition at line 203 of file asm_mips.h.

◆ mips_insn_opcode_t

Enumerator
mips_foreach_opcode 

Definition at line 140 of file asm_mips.h.

◆ mips_insn_regimm_rt_t

Enumerator
mips_foreach_regimm_rt 

Definition at line 161 of file asm_mips.h.

◆ mips_insn_special2_funct_t

Enumerator
mips_foreach_special2_funct 

Definition at line 154 of file asm_mips.h.

◆ mips_insn_special_funct_t

Enumerator
mips_foreach_special_funct 

Definition at line 147 of file asm_mips.h.

◆ mips_reg_t

enum mips_reg_t
Enumerator
MIPS_REG_SP 
MIPS_REG_RA 

Definition at line 337 of file asm_mips.h.

Function Documentation

◆ mips_insn_encode_i_type()

static u32 mips_insn_encode_i_type ( int  op,
int  rs,
int  rt,
int  immediate 
)
inlinestatic

Definition at line 252 of file asm_mips.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mips_insn_encode_j_type()

static u32 mips_insn_encode_j_type ( int  op,
u32  addr 
)
inlinestatic

Definition at line 269 of file asm_mips.h.

◆ mips_insn_encode_r_type()

static u32 mips_insn_encode_r_type ( int  op,
int  rs,
int  rt,
int  rd,
int  sa,
int  funct 
)
inlinestatic

Definition at line 280 of file asm_mips.h.

+ Here is the call graph for this function:

◆ mips_insn_get_funct()

static u32 mips_insn_get_funct ( u32  insn)
inlinestatic

Definition at line 240 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_immediate()

static i32 mips_insn_get_immediate ( u32  insn)
inlinestatic

Definition at line 246 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_op()

static mips_insn_opcode_t mips_insn_get_op ( u32  insn)
inlinestatic

Definition at line 210 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_rd()

static u32 mips_insn_get_rd ( u32  insn)
inlinestatic

Definition at line 228 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_rs()

static u32 mips_insn_get_rs ( u32  insn)
inlinestatic

Definition at line 216 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_rt()

static u32 mips_insn_get_rt ( u32  insn)
inlinestatic

Definition at line 222 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_get_sa()

static u32 mips_insn_get_sa ( u32  insn)
inlinestatic

Definition at line 234 of file asm_mips.h.

+ Here is the caller graph for this function:

◆ mips_insn_load()

static u32 mips_insn_load ( u32  rd,
i32  offset,
u32  base,
u32  log2_bytes 
)
inlinestatic

Definition at line 313 of file asm_mips.h.

+ Here is the call graph for this function: