Rizin
unix-like reverse engineering framework and cli tools
pic_baseline.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2018 thestr4ng3r <info@florianmaerkl.de>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef PIC_BASELINE_H
5 #define PIC_BASELINE_H
6 
7 #include <rz_types.h>
8 #include <rz_asm.h>
9 
10 typedef enum {
21 
22 #define PIC_BASELINE_OP_ARGS_2F_MASK_F 0x3
23 #define PIC_BASELINE_OP_ARGS_3F_MASK_F 0x7
24 #define PIC_BASELINE_OP_ARGS_3K_MASK_K 0x7
25 #define PIC_BASELINE_OP_ARGS_1D_5F_MASK_D (1 << 5)
26 #define PIC_BASELINE_OP_ARGS_1D_5F_MASK_F 0x1f
27 #define PIC_BASELINE_OP_ARGS_5F_MASK_F 0x1f
28 #define PIC_BASELINE_OP_ARGS_3B_5F_MASK_B (0x7 << 5)
29 #define PIC_BASELINE_OP_ARGS_3B_5F_MASK_F 0x1f
30 #define PIC_BASELINE_OP_ARGS_8K_MASK_K 0xff
31 #define PIC_BASELINE_OP_ARGS_9K_MASK_K 0x1ff
32 
33 typedef struct _pic_baseline_op {
34  const char *mnemonic;
37 
38 typedef enum {
77 
80 int pic_baseline_disassemble(RzAsmOp *op, char *opbuf, const ut8 *b, int l);
81 
82 #endif // PIC_BASELINE_H
uint16_t ut16
uint8_t ut8
Definition: lh5801.h:11
int pic_baseline_disassemble(RzAsmOp *op, char *opbuf, const ut8 *b, int l)
Definition: pic_baseline.c:193
struct _pic_baseline_op PicBaselineOpInfo
const PicBaselineOpInfo * pic_baseline_get_op_info(PicBaselineOpcode opcode)
Definition: pic_baseline.c:186
PicBaselineOpcode pic_baseline_get_opcode(ut16 instr)
Definition: pic_baseline.c:45
PicBaselineOpcode
Definition: pic_baseline.h:38
@ PIC_BASELINE_OPCODE_MOVWF
Definition: pic_baseline.h:47
@ PIC_BASELINE_OPCODE_BTFSS
Definition: pic_baseline.h:67
@ PIC_BASELINE_OPCODE_RETFIE
Definition: pic_baseline.h:46
@ PIC_BASELINE_OPCODE_COMF
Definition: pic_baseline.h:57
@ PIC_BASELINE_OPCODE_SLEEP
Definition: pic_baseline.h:41
@ PIC_BASELINE_OPCODE_TRIS
Definition: pic_baseline.h:43
@ PIC_BASELINE_OPCODE_RRF
Definition: pic_baseline.h:60
@ PIC_BASELINE_OPCODE_RETLW
Definition: pic_baseline.h:68
@ PIC_BASELINE_OPCODE_SWAPF
Definition: pic_baseline.h:62
@ PIC_BASELINE_OPCODE_MOVF
Definition: pic_baseline.h:56
@ PIC_BASELINE_OPCODE_CALL
Definition: pic_baseline.h:69
@ PIC_BASELINE_OPCODE_SUBWF
Definition: pic_baseline.h:50
@ PIC_BASELINE_OPCODE_BCF
Definition: pic_baseline.h:64
@ PIC_BASELINE_OPCODE_BTFSC
Definition: pic_baseline.h:66
@ PIC_BASELINE_OPCODE_MOVLW
Definition: pic_baseline.h:71
@ PIC_BASELINE_OPCODE_CLRW
Definition: pic_baseline.h:49
@ PIC_BASELINE_OPCODE_NOP
Definition: pic_baseline.h:39
@ PIC_BASELINE_OPCODE_RLF
Definition: pic_baseline.h:61
@ PIC_BASELINE_OPCODE_OPTION
Definition: pic_baseline.h:40
@ PIC_BASELINE_OPCODE_ANDWF
Definition: pic_baseline.h:53
@ PIC_BASELINE_OPCODE_RETURN
Definition: pic_baseline.h:45
@ PIC_BASELINE_OPCODE_BSF
Definition: pic_baseline.h:65
@ PIC_BASELINE_OPCODE_DECFSZ
Definition: pic_baseline.h:59
@ PIC_BASELINE_OPCODE_IORWF
Definition: pic_baseline.h:52
@ PIC_BASELINE_OPCODE_XORLW
Definition: pic_baseline.h:74
@ PIC_BASELINE_OPCODE_INCF
Definition: pic_baseline.h:58
@ PIC_BASELINE_OPCODE_XORWF
Definition: pic_baseline.h:54
@ PIC_BASELINE_OPCODE_DECF
Definition: pic_baseline.h:51
@ PIC_BASELINE_OPCODE_CLRWDT
Definition: pic_baseline.h:42
@ PIC_BASELINE_OPCODE_IORLW
Definition: pic_baseline.h:72
@ PIC_BASELINE_OPCODE_INCFSZ
Definition: pic_baseline.h:63
@ PIC_BASELINE_OPCODE_INVALID
Definition: pic_baseline.h:75
@ PIC_BASELINE_OPCODE_MOVLB
Definition: pic_baseline.h:44
@ PIC_BASELINE_OPCODE_ANDLW
Definition: pic_baseline.h:73
@ PIC_BASELINE_OPCODE_ADDWF
Definition: pic_baseline.h:55
@ PIC_BASELINE_OPCODE_CLRF
Definition: pic_baseline.h:48
@ PIC_BASELINE_OPCODE_GOTO
Definition: pic_baseline.h:70
PicBaselineOpArgs
Definition: pic_baseline.h:10
@ PIC_BASELINE_OP_ARGS_1D_5F
Definition: pic_baseline.h:15
@ PIC_BASELINE_OP_ARGS_5F
Definition: pic_baseline.h:16
@ PIC_BASELINE_OP_ARGS_3K
Definition: pic_baseline.h:14
@ PIC_BASELINE_OP_ARGS_3F
Definition: pic_baseline.h:13
@ PIC_BASELINE_OP_ARGS_8K
Definition: pic_baseline.h:18
@ PIC_BASELINE_OP_ARGS_3B_5F
Definition: pic_baseline.h:17
@ PIC_BASELINE_OP_ARGS_9K
Definition: pic_baseline.h:19
@ PIC_BASELINE_OP_ARGS_2F
Definition: pic_baseline.h:12
@ PIC_BASELINE_OP_ARGS_NONE
Definition: pic_baseline.h:11
#define b(i)
Definition: sha256.c:42
const char * mnemonic
Definition: pic_baseline.h:34
PicBaselineOpArgs args
Definition: pic_baseline.h:35
Definition: dis.c:32