Rizin
unix-like reverse engineering framework and cli tools
lanai-opc.c File Reference
#include <stdio.h>
#include "ansidecl.h"
#include "opcode/lanai.h"

Go to the source code of this file.

Macros

#define GENERIC_PAIR(mask, high)    (high),((mask)&~(high))
 
#define RI_PAIR(op, f, h)
 
#define RR_PAIR(f, op)
 
#define LEADZ_PAIR(f)
 
#define POPC_PAIR(f)
 
#define RRR_PAIR()
 
#define RM_PAIR(s, p, q)
 
#define RRM_PAIR(s, p, q, mode)
 
#define BR_PAIR(cond, r)
 
#define SCC_PAIR(cond)   GENERIC_PAIR (L3_SCC_MASK, L3_SCC | L3_BR_COND (cond))
 
#define SLS_PAIR(s)
 
#define SLI_PAIR()
 
#define SPLS_PAIR(s, mode, p, q)
 
#define PUNT_PAIR()
 
#define SBR_PAIR(cond, op, r)
 
#define PCREL_SBR_PAIR(cond)
 
#define RI_MOV_PAIR(op, f, h)
 
#define RR_MOV_PAIR(f, op)
 

Variables

const char * architecture_pname []
 
struct lanai_opcode lanai_opcodes []
 
const int bfd_lanai_num_opcodes = ((sizeof lanai_opcodes)/(sizeof lanai_opcodes[0]))
 

Macro Definition Documentation

◆ BR_PAIR

#define BR_PAIR (   cond,
  r 
)
Value:
L3_BR | L3_BR_COND(cond) | ((r)?L3_BR_R:0) )
#define r
Definition: crypto_rc6.c:12
#define GENERIC_PAIR(mask, high)
Definition: lanai-opc.c:82
#define L3_BR_MASK
Definition: lanai.h:241
#define L3_BR_R
Definition: lanai.h:321
#define L3_BR
Definition: lanai.h:239
#define L3_BR_COND(x)
Definition: lanai.h:355
#define cond(bop, top, mask, flags)

Definition at line 110 of file lanai-opc.c.

◆ GENERIC_PAIR

#define GENERIC_PAIR (   mask,
  high 
)     (high),((mask)&~(high))

Definition at line 82 of file lanai-opc.c.

◆ LEADZ_PAIR

#define LEADZ_PAIR (   f)
Value:
#define L3_LEADZ_MASK
Definition: lanai.h:226
#define L3_LEADZ_F
Definition: lanai.h:304
#define L3_LEADZ
Definition: lanai.h:224
#define f(i)
Definition: sha256.c:46

Definition at line 94 of file lanai-opc.c.

◆ PCREL_SBR_PAIR

#define PCREL_SBR_PAIR (   cond)
Value:
L3_SBR_OP(7), \
#define L3_SBR
Definition: lanai.h:266
#define L3_SBR_MASK
Definition: lanai.h:268
#define L3_SBR_OP(x)
Definition: lanai.h:364
#define L3_RS1(x)
Definition: lanai.h:345
#define L3_SBR_COND(x)
Definition: lanai.h:356
#define L3_SBR_R
Definition: lanai.h:334
#define L3_ADD
Definition: lanai.h:271

Definition at line 131 of file lanai-opc.c.

◆ POPC_PAIR

#define POPC_PAIR (   f)
Value:
L3_POPC | ((f)?L3_POPC_F:0))
#define L3_POPC
Definition: lanai.h:227
#define L3_POPC_F
Definition: lanai.h:305
#define L3_POPC_MASK
Definition: lanai.h:229

Definition at line 97 of file lanai-opc.c.

◆ PUNT_PAIR

#define PUNT_PAIR ( )
Value:
#define L3_PUNT_MASK
Definition: lanai.h:265
#define L3_PUNT
Definition: lanai.h:263

Definition at line 125 of file lanai-opc.c.

◆ RI_MOV_PAIR

#define RI_MOV_PAIR (   op,
  f,
  h 
)
Value:
L3_RI|L3_RI_OP(op)|((f)?L3_RI_F:0)|((h)?L3_RI_H:0)|(((op)==L3_AND)?L3_RS1(1):0))
#define L3_AND
Definition: lanai.h:275
#define L3_RI_MASK
Definition: lanai.h:220
#define L3_RI_F
Definition: lanai.h:300
#define L3_RI
Definition: lanai.h:218
#define L3_RI_H
Definition: lanai.h:301
#define L3_RI_OP(x)
Definition: lanai.h:349
#define h(i)
Definition: sha256.c:48
Definition: dis.c:32

Definition at line 137 of file lanai-opc.c.

◆ RI_PAIR

#define RI_PAIR (   op,
  f,
  h 
)
Value:

Definition at line 87 of file lanai-opc.c.

◆ RM_PAIR

#define RM_PAIR (   s,
  p,
 
)
Value:
L3_RM | ((s)?L3_RM_S:0) | ((p)?L3_RM_P:0) | ((q)?L3_RM_Q:0) )
#define L3_RM_MASK
Definition: lanai.h:235
#define L3_RM_Q
Definition: lanai.h:311
#define L3_RM
Definition: lanai.h:233
#define L3_RM_S
Definition: lanai.h:312
#define L3_RM_P
Definition: lanai.h:310
void * p
Definition: libc.cpp:67
static RzSocket * s
Definition: rtr.c:28

Definition at line 103 of file lanai-opc.c.

◆ RR_MOV_PAIR

#define RR_MOV_PAIR (   f,
  op 
)
Value:
GENERIC_PAIR(L3_RR_MASK|0x007c0000, \
L3_RR | ((f)?L3_RR_F:0) | L3_RR_OP(op) \
| (((op)&L3_ARITH)?1<<6:0) | ((op)==L3_SH?1<<7:0) )
#define L3_SH
Definition: lanai.h:278
#define L3_RR_F
Definition: lanai.h:303
#define L3_RR_MASK
Definition: lanai.h:223
#define L3_RR_OP(x)
Definition: lanai.h:350
#define L3_ARITH
Definition: lanai.h:281
#define L3_RR
Definition: lanai.h:221

Definition at line 141 of file lanai-opc.c.

◆ RR_PAIR

#define RR_PAIR (   f,
  op 
)
Value:
L3_RR | ((f)?L3_RR_F:0) | L3_RR_OP(op) \
| ((((op)&L3_OP_MASK)==L3_SH) ? ((op)&L3_ARITH?0xc0:0x80) : 0 ))
#define L3_OP_MASK
Definition: lanai.h:279

Definition at line 90 of file lanai-opc.c.

◆ RRM_PAIR

#define RRM_PAIR (   s,
  p,
  q,
  mode 
)
Value:
L3_RRM | ((s)?L3_RRM_S:0) | ((p)?L3_RRM_P:0) \
| ((q)?L3_RRM_Q:0) | L3_RRM_MODE(mode) )
const char int mode
Definition: ioapi.h:137
#define L3_RRM
Definition: lanai.h:236
#define L3_RRM_MASK
Definition: lanai.h:238
#define L3_RRM_Q
Definition: lanai.h:315
#define L3_RRM_MODE(x)
Definition: lanai.h:354
#define L3_RRM_S
Definition: lanai.h:316
#define L3_RRM_P
Definition: lanai.h:314

Definition at line 106 of file lanai-opc.c.

◆ RRR_PAIR

#define RRR_PAIR ( )
Value:
#define L3_RRR_MASK
Definition: lanai.h:232
#define L3_RRR
Definition: lanai.h:230

Definition at line 100 of file lanai-opc.c.

◆ SBR_PAIR

#define SBR_PAIR (   cond,
  op,
  r 
)
Value:

Definition at line 128 of file lanai-opc.c.

◆ SCC_PAIR

#define SCC_PAIR (   cond)    GENERIC_PAIR (L3_SCC_MASK, L3_SCC | L3_BR_COND (cond))

Definition at line 113 of file lanai-opc.c.

◆ SLI_PAIR

#define SLI_PAIR ( )
Value:
#define L3_SLI_MASK
Definition: lanai.h:253
#define L3_SLI
Definition: lanai.h:251

Definition at line 118 of file lanai-opc.c.

◆ SLS_PAIR

#define SLS_PAIR (   s)
Value:
L3_SLS | ((s)?L3_SLS_S:0) )
#define L3_SLS_S
Definition: lanai.h:323
#define L3_SLS
Definition: lanai.h:248
#define L3_SLS_MASK
Definition: lanai.h:250

Definition at line 115 of file lanai-opc.c.

◆ SPLS_PAIR

#define SPLS_PAIR (   s,
  mode,
  p,
 
)
Value:
| ((p)?L3_SPLS_P:0) | ((q)?L3_SPLS_Q:0) )
#define L3_SPLS_S
Definition: lanai.h:326
#define L3_SPLS_Q
Definition: lanai.h:329
#define L3_SPLS_MODE(x)
Definition: lanai.h:363
#define L3_SPLS
Definition: lanai.h:254
#define L3_SPLS_MASK
Definition: lanai.h:256
#define L3_SPLS_P
Definition: lanai.h:328

Definition at line 121 of file lanai-opc.c.

Variable Documentation

◆ architecture_pname

const char* architecture_pname[]
Initial value:
= {
"v0",
"v1",
}
#define NULL
Definition: cris-opc.c:27

Definition at line 71 of file lanai-opc.c.

◆ bfd_lanai_num_opcodes

const int bfd_lanai_num_opcodes = ((sizeof lanai_opcodes)/(sizeof lanai_opcodes[0]))

Definition at line 578 of file lanai-opc.c.

◆ lanai_opcodes

struct lanai_opcode lanai_opcodes[]

Definition at line 71 of file lanai-opc.c.