LCOV - code coverage report
Current view: top level - ballet/sbpf - fd_sbpf_opcodes.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 42 42 100.0 %
Date: 2024-11-13 11:58:15 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_ballet_sbpf_fd_sbpf_opcodes_h
       2             : #define HEADER_fd_src_ballet_sbpf_fd_sbpf_opcodes_h
       3             : 
       4             : #include "../../util/fd_util.h"
       5             : 
       6             : /* Register shortcut macros */
       7             : #define FD_SBPF_R0   (0)
       8             : #define FD_SBPF_R1   (1)
       9             : #define FD_SBPF_R2   (2)
      10             : #define FD_SBPF_R3   (3)
      11             : #define FD_SBPF_R4   (4)
      12             : #define FD_SBPF_R5   (5)
      13             : #define FD_SBPF_R6   (6)
      14             : #define FD_SBPF_R7   (7)
      15             : #define FD_SBPF_R8   (8)
      16             : #define FD_SBPF_R9   (9)
      17             : #define FD_SBPF_R10  (10)
      18             : 
      19             : /* Opcode related macros. The following are many macros used for the construction of BPF opcodes */
      20             : 
      21             : /* Opcode classes */
      22    33753177 : #define FD_SBPF_OPCODE_CLASS_LD    (0x0) /* (0b000) */
      23     3749811 : #define FD_SBPF_OPCODE_CLASS_LDX   (0x1) /* (0b001) */
      24     3750918 : #define FD_SBPF_OPCODE_CLASS_ST    (0x2) /* (0b010) */
      25     3752208 : #define FD_SBPF_OPCODE_CLASS_STX   (0x3) /* (0b011) */
      26     3747018 : #define FD_SBPF_OPCODE_CLASS_ALU   (0x4) /* (0b100) */
      27     3751272 : #define FD_SBPF_OPCODE_CLASS_JMP   (0x5) /* (0b101) */
      28     3750891 : #define FD_SBPF_OPCODE_CLASS_JMP32 (0x6) /* (0b110) */ /* eBPF only, in classic BPF this is RET */
      29     3744741 : #define FD_SBPF_OPCODE_CLASS_ALU64 (0x7) /* (0b111) */ /* eBPF only, in classic BPF this is MISC */
      30             : 
      31             : /* Source modes (only ALU, JMP, and ALU64 opcodes) */
      32             : #define FD_SBPF_OPCODE_SOURCE_MODE_NO_SOURCE (0x0) /* (0b0) */
      33             : #define FD_SBPF_OPCODE_SOURCE_MODE_UNARY_IMM (0x0) /* (0b0) */
      34             : #define FD_SBPF_OPCODE_SOURCE_MODE_UNARY_REG (0x0) /* (0b0) */
      35     5855379 : #define FD_SBPF_OPCODE_SOURCE_MODE_IMM       (0x0) /* (0b0) */
      36     5854566 : #define FD_SBPF_OPCODE_SOURCE_MODE_REG       (0x1) /* (0b1) */
      37             : 
      38             : #define FD_SBPF_OPCODE_END_MODE_HOST_TO_LE (0x0) /* (0b0) */
      39             : #define FD_SBPF_OPCODE_END_MODE_HOST_TO_BE (0x1) /* (0b1) */
      40             : 
      41             : /* Size modes (only LD, LDX, ST, and STX opcodes) */
      42     1876371 : #define FD_SBPF_OPCODE_SIZE_MODE_WORD (0x0) /* (0b00) */
      43     1873182 : #define FD_SBPF_OPCODE_SIZE_MODE_HALF (0x1) /* (0b01) */
      44     1877067 : #define FD_SBPF_OPCODE_SIZE_MODE_BYTE (0x2) /* (0b10) */
      45     1875399 : #define FD_SBPF_OPCODE_SIZE_MODE_DOUB (0x3) /* (0b11) */ /* eBPF only */
      46             : 
      47      469560 : #define FD_SBPF_OPCODE_ALU_OP_MODE_ADD   (0x0) /* (0b0000) */
      48      466773 : #define FD_SBPF_OPCODE_ALU_OP_MODE_SUB   (0x1) /* (0b0001) */
      49      467028 : #define FD_SBPF_OPCODE_ALU_OP_MODE_MUL   (0x2) /* (0b0010) */
      50      468531 : #define FD_SBPF_OPCODE_ALU_OP_MODE_DIV   (0x3) /* (0b0011) */
      51      468021 : #define FD_SBPF_OPCODE_ALU_OP_MODE_OR    (0x4) /* (0b0100) */
      52      467013 : #define FD_SBPF_OPCODE_ALU_OP_MODE_AND   (0x5) /* (0b0101) */
      53      469251 : #define FD_SBPF_OPCODE_ALU_OP_MODE_LSH   (0x6) /* (0b0110) */
      54      467364 : #define FD_SBPF_OPCODE_ALU_OP_MODE_RSH   (0x7) /* (0b0111) */
      55      467880 : #define FD_SBPF_OPCODE_ALU_OP_MODE_NEG   (0x8) /* (0b1000) */
      56      469461 : #define FD_SBPF_OPCODE_ALU_OP_MODE_MOD   (0x9) /* (0b1001) */
      57      468939 : #define FD_SBPF_OPCODE_ALU_OP_MODE_XOR   (0xA) /* (0b1010) */
      58      468300 : #define FD_SBPF_OPCODE_ALU_OP_MODE_MOV   (0xB) /* (0b1011) */ /* eBPF only */
      59      468492 : #define FD_SBPF_OPCODE_ALU_OP_MODE_ARSH  (0xC) /* (0b1100) */ /* eBPF only */
      60      468588 : #define FD_SBPF_OPCODE_ALU_OP_MODE_END   (0xD) /* (0b1101) */ /* eBPF only */
      61             : 
      62      469752 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JA    (0x0) /* (0b0000) */ /* only for FD_SBPF_OPCODE_CLASS_JMP */
      63      466641 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JEQ   (0x1) /* (0b0001) */
      64      471039 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JGT   (0x2) /* (0b0010) */
      65      467022 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JGE   (0x3) /* (0b0011) */
      66      470964 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JSET  (0x4) /* (0b0100) */
      67      466776 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JNE   (0x5) /* (0b0101) */ /* eBPF only */
      68      467802 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JSGT  (0x6) /* (0b0110) */ /* eBPF only */
      69      469074 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JSGE  (0x7) /* (0b0111) */ /* eBPF only */
      70      469824 : #define FD_SBPF_OPCODE_JMP_OP_MODE_CALL  (0x8) /* (0b1000) */ /* eBPF only */
      71      469584 : #define FD_SBPF_OPCODE_JMP_OP_MODE_EXIT  (0x9) /* (0b1001) */ /* eBPF only */
      72      470478 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JLT   (0xA) /* (0b1010) */ /* eBPF only */
      73      467139 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JLE   (0xB) /* (0b1011) */ /* eBPF only */
      74      467706 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JSLT  (0xC) /* (0b1100) */ /* eBPF only */
      75      468159 : #define FD_SBPF_OPCODE_JMP_OP_MODE_JSLE  (0xD) /* (0b1101) */ /* eBPF only */
      76             : 
      77             : #define FD_SBPF_OPCODE_ADDR_MODE_IMM   (0x0) /* (0b000) */
      78             : #define FD_SBPF_OPCODE_ADDR_MODE_ABS   (0x1) /* (0b001) */ /* kernel mode only */
      79             : #define FD_SBPF_OPCODE_ADDR_MODE_IND   (0x2) /* (0b010) */ /* kernel mode only */
      80             : #define FD_SBPF_OPCODE_ADDR_MODE_MEM   (0x3) /* (0b011) */
      81             : #define FD_SBPF_OPCODE_ADDR_MODE_LEN   (0x4) /* (0b100) */ /* classic BPF only */
      82             : #define FD_SBPF_OPCODE_ADDR_MODE_MSH   (0x5) /* (0b101) */ /* classic BPF only */
      83             : #define FD_SBPF_OPCODE_ADDR_MODE_XADD  (0x6) /* (0b110) */ /* eBPF only */
      84             : 
      85             : /* Instruction opcode definition macros */
      86             : /* Normal instruction opcode definition macro */
      87             : #define FD_SBPF_DEFINE_NORM_INSTR(cls,mode,src) ((cls) | (mode << 4) | (src << 3))
      88             : /* Memory access instruction opcode definition macro */
      89             : #define FD_SBPF_DEFINE_MEM_INSTR(cls,addr_mode,sz) ((cls) | (addr_mode << 5) | (sz << 3))
      90             : 
      91             : /* Instruction opcode constants */
      92             : static const uchar FD_SBPF_OP_ADD_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_ADD,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
      93             : static const uchar FD_SBPF_OP_ADD_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_ADD,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
      94             : static const uchar FD_SBPF_OP_SUB_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_SUB,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
      95             : static const uchar FD_SBPF_OP_SUB_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_SUB,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
      96             : static const uchar FD_SBPF_OP_MUL_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MUL,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
      97             : static const uchar FD_SBPF_OP_MUL_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MUL,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
      98             : static const uchar FD_SBPF_OP_DIV_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_DIV,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
      99             : static const uchar FD_SBPF_OP_DIV_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_DIV,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     100             : static const uchar FD_SBPF_OP_OR_IMM =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_OR,     FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     101             : static const uchar FD_SBPF_OP_OR_REG =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_OR,     FD_SBPF_OPCODE_SOURCE_MODE_REG);
     102             : static const uchar FD_SBPF_OP_AND_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_AND,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     103             : static const uchar FD_SBPF_OP_AND_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_AND,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     104             : static const uchar FD_SBPF_OP_LSH_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_LSH,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     105             : static const uchar FD_SBPF_OP_LSH_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_LSH,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     106             : static const uchar FD_SBPF_OP_RSH_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_RSH,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     107             : static const uchar FD_SBPF_OP_RSH_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_RSH,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     108             : static const uchar FD_SBPF_OP_NEG =       FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_NEG,    FD_SBPF_OPCODE_SOURCE_MODE_UNARY_REG);
     109             : static const uchar FD_SBPF_OP_MOD_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MOD,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     110             : static const uchar FD_SBPF_OP_MOD_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MOD,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     111             : static const uchar FD_SBPF_OP_XOR_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_XOR,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     112             : static const uchar FD_SBPF_OP_XOR_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_XOR,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     113             : static const uchar FD_SBPF_OP_MOV_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MOV,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     114             : static const uchar FD_SBPF_OP_MOV_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_MOV,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     115             : static const uchar FD_SBPF_OP_ARSH_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_ARSH,   FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     116             : static const uchar FD_SBPF_OP_ARSH_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_ARSH,   FD_SBPF_OPCODE_SOURCE_MODE_REG);
     117             : static const uchar FD_SBPF_OP_END_LE =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_END,    FD_SBPF_OPCODE_END_MODE_HOST_TO_LE);
     118             : static const uchar FD_SBPF_OP_END_BE =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU,   FD_SBPF_OPCODE_ALU_OP_MODE_END,    FD_SBPF_OPCODE_END_MODE_HOST_TO_BE);
     119             : 
     120             : static const uchar FD_SBPF_OP_ADD64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_ADD,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     121             : static const uchar FD_SBPF_OP_ADD64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_ADD,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     122             : static const uchar FD_SBPF_OP_SUB64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_SUB,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     123             : static const uchar FD_SBPF_OP_SUB64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_SUB,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     124             : static const uchar FD_SBPF_OP_MUL64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MUL,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     125             : static const uchar FD_SBPF_OP_MUL64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MUL,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     126             : static const uchar FD_SBPF_OP_DIV64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_DIV,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     127             : static const uchar FD_SBPF_OP_DIV64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_DIV,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     128             : static const uchar FD_SBPF_OP_OR64_IMM =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_OR,     FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     129             : static const uchar FD_SBPF_OP_OR64_REG =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_OR,     FD_SBPF_OPCODE_SOURCE_MODE_REG);
     130             : static const uchar FD_SBPF_OP_AND64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_AND,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     131             : static const uchar FD_SBPF_OP_AND64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_AND,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     132             : static const uchar FD_SBPF_OP_LSH64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_LSH,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     133             : static const uchar FD_SBPF_OP_LSH64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_LSH,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     134             : static const uchar FD_SBPF_OP_RSH64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_RSH,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     135             : static const uchar FD_SBPF_OP_RSH64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_RSH,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     136             : static const uchar FD_SBPF_OP_NEG64 =       FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_NEG,    FD_SBPF_OPCODE_SOURCE_MODE_UNARY_REG);
     137             : static const uchar FD_SBPF_OP_MOD64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MOD,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     138             : static const uchar FD_SBPF_OP_MOD64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MOD,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     139             : static const uchar FD_SBPF_OP_XOR64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_XOR,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     140             : static const uchar FD_SBPF_OP_XOR64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_XOR,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     141             : static const uchar FD_SBPF_OP_MOV64_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MOV,    FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     142             : static const uchar FD_SBPF_OP_MOV64_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_MOV,    FD_SBPF_OPCODE_SOURCE_MODE_REG);
     143             : static const uchar FD_SBPF_OP_ARSH64_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_ARSH,   FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     144             : static const uchar FD_SBPF_OP_ARSH64_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_ARSH,   FD_SBPF_OPCODE_SOURCE_MODE_REG);
     145             : static const uchar FD_SBPF_OP_END64_LE =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_END,    FD_SBPF_OPCODE_END_MODE_HOST_TO_LE);
     146             : static const uchar FD_SBPF_OP_END64_BE =    FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_ALU64,   FD_SBPF_OPCODE_ALU_OP_MODE_END,    FD_SBPF_OPCODE_END_MODE_HOST_TO_BE);
     147             : 
     148             : static const uchar FD_SBPF_OP_JA =        FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JA,   FD_SBPF_OPCODE_SOURCE_MODE_UNARY_IMM);
     149             : static const uchar FD_SBPF_OP_JEQ_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JEQ,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     150             : static const uchar FD_SBPF_OP_JEQ_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JEQ,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     151             : static const uchar FD_SBPF_OP_JGT_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGT,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     152             : static const uchar FD_SBPF_OP_JGT_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGT,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     153             : static const uchar FD_SBPF_OP_JGE_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     154             : static const uchar FD_SBPF_OP_JGE_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     155             : static const uchar FD_SBPF_OP_JSET_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSET, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     156             : static const uchar FD_SBPF_OP_JSET_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSET, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     157             : static const uchar FD_SBPF_OP_JNE_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JNE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     158             : static const uchar FD_SBPF_OP_JNE_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JNE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     159             : static const uchar FD_SBPF_OP_JSGT_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGT, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     160             : static const uchar FD_SBPF_OP_JSGT_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGT, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     161             : static const uchar FD_SBPF_OP_JSGE_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGE, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     162             : static const uchar FD_SBPF_OP_JSGE_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGE, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     163             : static const uchar FD_SBPF_OP_CALL_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_CALL, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     164             : static const uchar FD_SBPF_OP_CALL_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_CALL, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     165             : static const uchar FD_SBPF_OP_EXIT =      FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_EXIT, FD_SBPF_OPCODE_SOURCE_MODE_NO_SOURCE);
     166             : static const uchar FD_SBPF_OP_JLT_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLT,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     167             : static const uchar FD_SBPF_OP_JLT_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLT,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     168             : static const uchar FD_SBPF_OP_JLE_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     169             : static const uchar FD_SBPF_OP_JLE_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     170             : static const uchar FD_SBPF_OP_JSLT_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLT, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     171             : static const uchar FD_SBPF_OP_JSLT_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLT, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     172             : static const uchar FD_SBPF_OP_JSLE_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLE, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     173             : static const uchar FD_SBPF_OP_JSLE_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLE, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     174             : 
     175             : static const uchar FD_SBPF_OP_JEQ32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JEQ,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     176             : static const uchar FD_SBPF_OP_JEQ32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JEQ,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     177             : static const uchar FD_SBPF_OP_JGT32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGT,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     178             : static const uchar FD_SBPF_OP_JGT32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGT,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     179             : static const uchar FD_SBPF_OP_JGE32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     180             : static const uchar FD_SBPF_OP_JGE32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JGE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     181             : static const uchar FD_SBPF_OP_JSET32_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSET, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     182             : static const uchar FD_SBPF_OP_JSET32_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSET, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     183             : static const uchar FD_SBPF_OP_JNE32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JNE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     184             : static const uchar FD_SBPF_OP_JNE32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JNE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     185             : static const uchar FD_SBPF_OP_JSGT32_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGT, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     186             : static const uchar FD_SBPF_OP_JSGT32_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGT, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     187             : static const uchar FD_SBPF_OP_JSGE32_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGE, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     188             : static const uchar FD_SBPF_OP_JSGE32_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSGE, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     189             : static const uchar FD_SBPF_OP_JLT32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLT,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     190             : static const uchar FD_SBPF_OP_JLT32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLT,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     191             : static const uchar FD_SBPF_OP_JLE32_IMM =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLE,  FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     192             : static const uchar FD_SBPF_OP_JLE32_REG =   FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JLE,  FD_SBPF_OPCODE_SOURCE_MODE_REG);
     193             : static const uchar FD_SBPF_OP_JSLT32_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLT, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     194             : static const uchar FD_SBPF_OP_JSLT32_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLT, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     195             : static const uchar FD_SBPF_OP_JSLE32_IMM =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLE, FD_SBPF_OPCODE_SOURCE_MODE_IMM);
     196             : static const uchar FD_SBPF_OP_JSLE32_REG =  FD_SBPF_DEFINE_NORM_INSTR(FD_SBPF_OPCODE_CLASS_JMP, FD_SBPF_OPCODE_JMP_OP_MODE_JSLE, FD_SBPF_OPCODE_SOURCE_MODE_REG);
     197             : 
     198             : static const uchar FD_SBPF_OP_LDDW =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_LD,   FD_SBPF_OPCODE_ADDR_MODE_IMM,  FD_SBPF_OPCODE_SIZE_MODE_DOUB);
     199             : 
     200             : static const uchar FD_SBPF_OP_LDXW  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_LDX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_WORD);
     201             : static const uchar FD_SBPF_OP_LDXH  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_LDX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_HALF);
     202             : static const uchar FD_SBPF_OP_LDXB  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_LDX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_BYTE);
     203             : static const uchar FD_SBPF_OP_LDXDW =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_LDX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_DOUB);
     204             : 
     205             : static const uchar FD_SBPF_OP_STW  =   FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_ST,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_WORD);
     206             : static const uchar FD_SBPF_OP_STH  =   FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_ST,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_HALF);
     207             : static const uchar FD_SBPF_OP_STB  =   FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_ST,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_BYTE);
     208             : static const uchar FD_SBPF_OP_STDW =   FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_ST,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_DOUB);
     209             : 
     210             : static const uchar FD_SBPF_OP_STXW  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_STX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_WORD);
     211             : static const uchar FD_SBPF_OP_STXH  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_STX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_HALF);
     212             : static const uchar FD_SBPF_OP_STXB  =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_STX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_BYTE);
     213             : static const uchar FD_SBPF_OP_STXDW =  FD_SBPF_DEFINE_MEM_INSTR(FD_SBPF_OPCODE_CLASS_STX,  FD_SBPF_OPCODE_ADDR_MODE_MEM,  FD_SBPF_OPCODE_SIZE_MODE_DOUB);
     214             : 
     215             : static const uchar FD_SBPF_OP_ADDL_IMM = (0x00); /* (0b00000000) */
     216             : 
     217             : #endif // HEADER_fd_src_ballet_sbpf_fd_sbpf_opcodes_h

Generated by: LCOV version 1.14