ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/disass/bfd.h
Revision: 1.6
Committed: 2007-06-07T09:51:56Z (17 years, 5 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +37 -0 lines
Error occurred while calculating annotation data.
Log Message:
Add MIPS disassembler invoked as "dm" and "dmel" (little-endian) for now.

File Contents

# Content
1 /*
2 * bfd.h - Dummy bfd library header file
3 */
4
5 #include "sysdeps.h"
6 #include "ansidecl.h"
7
8 enum bfd_flavour {
9 bfd_target_unknown_flavour
10 };
11
12 enum bfd_endian {
13 BFD_ENDIAN_BIG,
14 BFD_ENDIAN_LITTLE,
15 BFD_ENDIAN_UNKNOWN
16 };
17
18 enum bfd_architecture {
19 bfd_arch_unknown,
20 bfd_arch_m68k,
21 #define bfd_mach_m68000 1
22 #define bfd_mach_m68008 2
23 #define bfd_mach_m68010 3
24 #define bfd_mach_m68020 4
25 #define bfd_mach_m68030 5
26 #define bfd_mach_m68040 6
27 #define bfd_mach_m68060 7
28 bfd_arch_mips,
29 #define bfd_mach_mips3000 3000
30 #define bfd_mach_mips3900 3900
31 #define bfd_mach_mips4000 4000
32 #define bfd_mach_mips4010 4010
33 #define bfd_mach_mips4100 4100
34 #define bfd_mach_mips4111 4111
35 #define bfd_mach_mips4120 4120
36 #define bfd_mach_mips4300 4300
37 #define bfd_mach_mips4400 4400
38 #define bfd_mach_mips4600 4600
39 #define bfd_mach_mips4650 4650
40 #define bfd_mach_mips5000 5000
41 #define bfd_mach_mips5400 5400
42 #define bfd_mach_mips5500 5500
43 #define bfd_mach_mips6000 6000
44 #define bfd_mach_mips7000 7000
45 #define bfd_mach_mips8000 8000
46 #define bfd_mach_mips9000 9000
47 #define bfd_mach_mips10000 10000
48 #define bfd_mach_mips12000 12000
49 #define bfd_mach_mips16 16
50 #define bfd_mach_mips5 5
51 #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
52 #define bfd_mach_mipsisa32 32
53 #define bfd_mach_mipsisa32r2 33
54 #define bfd_mach_mipsisa64 64
55 #define bfd_mach_mipsisa64r2 65
56 bfd_arch_i386
57 #define bfd_mach_i386_i386 0
58 #define bfd_mach_i386_i8086 1
59 #define bfd_mach_i386_i386_intel_syntax 2
60 #define bfd_mach_x86_64 3
61 #define bfd_mach_x86_64_intel_syntax 4
62 };
63
64 typedef struct symbol_cache_entry {
65 CONST char *name;
66 } asymbol;
67
68 typedef uint64 bfd_vma;
69 typedef int64 bfd_signed_vma;
70 typedef unsigned char bfd_byte;
71
72 typedef struct _bfd bfd;
73 struct _bfd;
74
75 typedef int bfd_boolean;
76 #undef FALSE
77 #undef TRUE
78 #define FALSE 0
79 #define TRUE 1
80
81 /* Note - these macros do NOT work if STR2 is not a constant string. */
82 #define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
83
84 #if SIZEOF_LONG == 8
85 #define BFD_HOST_64BIT_LONG 1
86 #endif
87
88 // 64-bit vma
89 #define BFD64
90
91 #ifndef fprintf_vma
92 #if BFD_HOST_64BIT_LONG
93 #define sprintf_vma(s,x) sprintf (s, "%016lx", x)
94 #define fprintf_vma(f,x) fprintf (f, "%016lx", x)
95 #else
96 #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
97 #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
98 #define fprintf_vma(s,x) \
99 fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
100 #define sprintf_vma(s,x) \
101 sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
102 #endif
103 #endif