This source file includes following definitions.
- get_arch_regstr
1
2
3
4
5 #include <stddef.h>
6 #include <dwarf-regs.h>
7
8 #if defined(__CSKYABIV2__)
9 #define CSKY_MAX_REGS 73
10 const char *csky_dwarf_regs_table[CSKY_MAX_REGS] = {
11
12 "%a0", "%a1", "%a2", "%a3", "%regs0", "%regs1", "%regs2", "%regs3",
13
14 "%regs4", "%regs5", "%regs6", "%regs7", "%regs8", "%regs9", "%sp",
15 "%lr",
16
17 "%exregs0", "%exregs1", "%exregs2", "%exregs3", "%exregs4",
18 "%exregs5", "%exregs6", "%exregs7",
19
20 "%exregs8", "%exregs9", "%exregs10", "%exregs11", "%exregs12",
21 "%exregs13", "%exregs14", "%tls",
22 "%pc", NULL, NULL, NULL, "%hi", "%lo", NULL, NULL,
23 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
24 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
25 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
26 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
27 "%epc",
28 };
29 #else
30 #define CSKY_MAX_REGS 57
31 const char *csky_dwarf_regs_table[CSKY_MAX_REGS] = {
32
33 "%sp", "%regs9", "%a0", "%a1", "%a2", "%a3", "%regs0", "%regs1",
34
35 "%regs2", "%regs3", "%regs4", "%regs5", "%regs6", "%regs7", "%regs8",
36 "%lr",
37 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
38 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
39 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
40 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
41 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
42 "%epc",
43 };
44 #endif
45
46 const char *get_arch_regstr(unsigned int n)
47 {
48 return (n < CSKY_MAX_REGS) ? csky_dwarf_regs_table[n] : NULL;
49 }