Revision 1ad2134f cpu-defs.h
b/cpu-defs.h | ||
---|---|---|
30 | 30 |
#include <signal.h> |
31 | 31 |
#include "osdep.h" |
32 | 32 |
#include "sys-queue.h" |
33 |
#include "targphys.h" |
|
33 | 34 |
|
34 | 35 |
#ifndef TARGET_LONG_BITS |
35 | 36 |
#error TARGET_LONG_BITS must be defined before including this header |
36 | 37 |
#endif |
37 | 38 |
|
38 |
#ifndef TARGET_PHYS_ADDR_BITS |
|
39 |
#if TARGET_LONG_BITS >= HOST_LONG_BITS |
|
40 |
#define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS |
|
41 |
#else |
|
42 |
#define TARGET_PHYS_ADDR_BITS HOST_LONG_BITS |
|
43 |
#endif |
|
44 |
#endif |
|
45 |
|
|
46 | 39 |
#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8) |
47 | 40 |
|
48 | 41 |
/* target_ulong is the type of a virtual address */ |
... | ... | |
62 | 55 |
#error TARGET_LONG_SIZE undefined |
63 | 56 |
#endif |
64 | 57 |
|
65 |
/* target_phys_addr_t is the type of a physical address (its size can |
|
66 |
be different from 'target_ulong'). We have sizeof(target_phys_addr) |
|
67 |
= max(sizeof(unsigned long), |
|
68 |
sizeof(size_of_target_physical_address)) because we must pass a |
|
69 |
host pointer to memory operations in some cases */ |
|
70 |
|
|
71 |
#if TARGET_PHYS_ADDR_BITS == 32 |
|
72 |
typedef uint32_t target_phys_addr_t; |
|
73 |
#define TARGET_FMT_plx "%08x" |
|
74 |
#elif TARGET_PHYS_ADDR_BITS == 64 |
|
75 |
typedef uint64_t target_phys_addr_t; |
|
76 |
#define TARGET_FMT_plx "%016" PRIx64 |
|
77 |
#else |
|
78 |
#error TARGET_PHYS_ADDR_BITS undefined |
|
79 |
#endif |
|
80 |
|
|
81 | 58 |
#define HOST_LONG_SIZE (HOST_LONG_BITS / 8) |
82 | 59 |
|
83 | 60 |
#define EXCP_INTERRUPT 0x10000 /* async interruption */ |
Also available in: Unified diff