ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/disass/bfd.h
Revision: 1.5
Committed: 2003-01-29T20:56:50Z (21 years, 9 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: release_3-1, release_3-2
Changes since 1.4: +3 -1 lines
Log Message:
Define BFD64 everywhere since we have 64-bit bfd_vma. Thusly fix x86-64
disassembler.

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * bfd.h - Dummy bfd library header file
3     */
4    
5 gbeauche 1.3 #include "sysdeps.h"
6 cebix 1.1 #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_i386
29     #define bfd_mach_i386_i386 0
30     #define bfd_mach_i386_i8086 1
31 gbeauche 1.2 #define bfd_mach_i386_i386_intel_syntax 2
32     #define bfd_mach_x86_64 3
33     #define bfd_mach_x86_64_intel_syntax 4
34 cebix 1.1 };
35    
36     typedef struct symbol_cache_entry {
37     CONST char *name;
38     } asymbol;
39    
40 gbeauche 1.3 typedef uint64 bfd_vma;
41     typedef int64 bfd_signed_vma;
42 cebix 1.1 typedef unsigned char bfd_byte;
43    
44     typedef struct _bfd bfd;
45     struct _bfd;
46 gbeauche 1.2
47 gbeauche 1.4 #if SIZEOF_LONG == 8
48 gbeauche 1.2 #define BFD_HOST_64BIT_LONG 1
49 gbeauche 1.5 #endif
50    
51     // 64-bit vma
52 gbeauche 1.4 #define BFD64
53 gbeauche 1.2
54     #ifndef fprintf_vma
55     #if BFD_HOST_64BIT_LONG
56     #define sprintf_vma(s,x) sprintf (s, "%016lx", x)
57     #define fprintf_vma(f,x) fprintf (f, "%016lx", x)
58     #else
59     #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
60     #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
61     #define fprintf_vma(s,x) \
62     fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
63     #define sprintf_vma(s,x) \
64     sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
65     #endif
66     #endif