1
2
3
4
5
6
7
8
9#ifndef __ASM_S390_DIS_H__
10#define __ASM_S390_DIS_H__
11
12
13#define OPERAND_GPR 0x1
14#define OPERAND_FPR 0x2
15#define OPERAND_AR 0x4
16#define OPERAND_CR 0x8
17#define OPERAND_VR 0x10
18#define OPERAND_DISP 0x20
19#define OPERAND_BASE 0x40
20#define OPERAND_INDEX 0x80
21#define OPERAND_PCREL 0x100
22#define OPERAND_SIGNED 0x200
23#define OPERAND_LENGTH 0x400
24
25
26struct s390_operand {
27 int bits;
28 int shift;
29 int flags;
30};
31
32struct s390_insn {
33 const char name[5];
34 unsigned char opfrag;
35 unsigned char format;
36};
37
38
39static inline int insn_length(unsigned char code)
40{
41 return ((((int) code + 64) >> 7) + 1) << 1;
42}
43
44struct pt_regs;
45
46void show_code(struct pt_regs *regs);
47void print_fn_code(unsigned char *code, unsigned long len);
48int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len);
49struct s390_insn *find_insn(unsigned char *code);
50
51static inline int is_known_insn(unsigned char *code)
52{
53 return !!find_insn(code);
54}
55
56#endif
57