Problemas com os relocs
[pspdecompiler.git] / analyser.h
blob524ae7db3e148df1506d23f4548ec3bc4fb997ad
1 #ifndef __ANALYSER_H
2 #define __ANALYSER_H
4 #include "prx.h"
5 #include "allegrex.h"
6 #include "llist.h"
7 #include "types.h"
9 enum jump_type {
10 JTYPE_NONE,
11 JTYPE_BRANCH,
12 JTYPE_BRANCHLIKELY,
13 JTYPE_BRANCHANDLINK,
14 JTYPE_BRANCHANDLINKLIKELY,
15 JTYPE_JUMP,
16 JTYPE_JUMPANDLINK,
17 JTYPE_JUMPREGISTER,
18 JTYPE_JUMPANDLINKREGISTER
21 struct location {
22 uint32 opc;
23 uint32 address;
25 enum insn_type itype;
27 uint32 target_addr;
28 enum jump_type jtype;
29 struct location *target;
31 llist jumprefs;
32 llist callrefs;
35 struct code {
36 struct prx *image;
38 uint32 baddr, numopc;
39 struct location *base;
41 llist subroutines;
43 llist_pool pool;
46 struct code* analyse_code (struct prx *p);
47 void free_code (struct code *c);
48 void print_code (struct code *c);
50 #endif /* __ANALYSER_H */