45 |
#define READ_ACCESS_TYPE 0 |
#define READ_ACCESS_TYPE 0 |
46 |
#endif |
#endif |
47 |
|
|
48 |
static DATA_TYPE glue(glue(slow_ld, SUFFIX), MMUSUFFIX)(unsigned long addr, |
static DATA_TYPE glue(glue(slow_ld, SUFFIX), MMUSUFFIX)(target_ulong addr, |
49 |
int is_user, |
int is_user, |
50 |
void *retaddr); |
void *retaddr); |
51 |
static inline DATA_TYPE glue(io_read, SUFFIX)(unsigned long physaddr, |
static inline DATA_TYPE glue(io_read, SUFFIX)(unsigned long physaddr, |
52 |
unsigned long tlb_addr) |
target_ulong tlb_addr) |
53 |
{ |
{ |
54 |
DATA_TYPE res; |
DATA_TYPE res; |
55 |
int index; |
int index; |
70 |
} |
} |
71 |
|
|
72 |
/* handle all cases except unaligned access which span two pages */ |
/* handle all cases except unaligned access which span two pages */ |
73 |
DATA_TYPE REGPARM(1) glue(glue(__ld, SUFFIX), MMUSUFFIX)(unsigned long addr, |
DATA_TYPE REGPARM(1) glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr, |
74 |
int is_user) |
int is_user) |
75 |
{ |
{ |
76 |
DATA_TYPE res; |
DATA_TYPE res; |
77 |
int index; |
int index; |
78 |
unsigned long physaddr, tlb_addr; |
target_ulong tlb_addr; |
79 |
|
unsigned long physaddr; |
80 |
void *retaddr; |
void *retaddr; |
81 |
|
|
82 |
/* test if there is match for unaligned or IO access */ |
/* test if there is match for unaligned or IO access */ |
111 |
} |
} |
112 |
|
|
113 |
/* handle all unaligned cases */ |
/* handle all unaligned cases */ |
114 |
static DATA_TYPE glue(glue(slow_ld, SUFFIX), MMUSUFFIX)(unsigned long addr, |
static DATA_TYPE glue(glue(slow_ld, SUFFIX), MMUSUFFIX)(target_ulong addr, |
115 |
int is_user, |
int is_user, |
116 |
void *retaddr) |
void *retaddr) |
117 |
{ |
{ |
118 |
DATA_TYPE res, res1, res2; |
DATA_TYPE res, res1, res2; |
119 |
int index, shift; |
int index, shift; |
120 |
unsigned long physaddr, tlb_addr, addr1, addr2; |
unsigned long physaddr; |
121 |
|
target_ulong tlb_addr, addr1, addr2; |
122 |
|
|
123 |
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); |
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); |
124 |
redo: |
redo: |
160 |
|
|
161 |
#ifndef SOFTMMU_CODE_ACCESS |
#ifndef SOFTMMU_CODE_ACCESS |
162 |
|
|
163 |
static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(unsigned long addr, |
static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr, |
164 |
DATA_TYPE val, |
DATA_TYPE val, |
165 |
int is_user, |
int is_user, |
166 |
void *retaddr); |
void *retaddr); |
167 |
|
|
168 |
static inline void glue(io_write, SUFFIX)(unsigned long physaddr, |
static inline void glue(io_write, SUFFIX)(unsigned long physaddr, |
169 |
DATA_TYPE val, |
DATA_TYPE val, |
170 |
unsigned long tlb_addr, |
target_ulong tlb_addr, |
171 |
void *retaddr) |
void *retaddr) |
172 |
{ |
{ |
173 |
int index; |
int index; |
188 |
#endif /* SHIFT > 2 */ |
#endif /* SHIFT > 2 */ |
189 |
} |
} |
190 |
|
|
191 |
void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(unsigned long addr, |
void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, |
192 |
DATA_TYPE val, |
DATA_TYPE val, |
193 |
int is_user) |
int is_user) |
194 |
{ |
{ |
195 |
unsigned long physaddr, tlb_addr; |
unsigned long physaddr; |
196 |
|
target_ulong tlb_addr; |
197 |
void *retaddr; |
void *retaddr; |
198 |
int index; |
int index; |
199 |
|
|
226 |
} |
} |
227 |
|
|
228 |
/* handles all unaligned cases */ |
/* handles all unaligned cases */ |
229 |
static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(unsigned long addr, |
static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr, |
230 |
DATA_TYPE val, |
DATA_TYPE val, |
231 |
int is_user, |
int is_user, |
232 |
void *retaddr) |
void *retaddr) |
233 |
{ |
{ |
234 |
unsigned long physaddr, tlb_addr; |
unsigned long physaddr; |
235 |
|
target_ulong tlb_addr; |
236 |
int index, i; |
int index, i; |
237 |
|
|
238 |
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); |
index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); |