Revision 5fafdf24 softmmu_header.h

b/softmmu_header.h
1 1
/*
2 2
 *  Software MMU support
3
 * 
3
 *
4 4
 *  Copyright (c) 2003 Fabrice Bellard
5 5
 *
6 6
 * This library is free software; you can redistribute it and/or
......
151 151
#endif
152 152
                  "2:\n"
153 153
                  : "=r" (res)
154
                  : "r" (ptr), 
155
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), 
156
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), 
154
                  : "r" (ptr),
155
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
156
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
157 157
                  "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),
158 158
                  "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_read)),
159 159
                  "i" (CPU_MEM_INDEX),
......
198 198
#endif
199 199
                  "2:\n"
200 200
                  : "=r" (res)
201
                  : "r" (ptr), 
202
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), 
203
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), 
201
                  : "r" (ptr),
202
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
203
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
204 204
                  "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),
205 205
                  "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_read)),
206 206
                  "i" (CPU_MEM_INDEX),
......
246 246
#error unsupported size
247 247
#endif
248 248
                  "2:\n"
249
                  : 
250
                  : "r" (ptr), 
249
                  :
250
                  : "r" (ptr),
251 251
/* NOTE: 'q' would be needed as constraint, but we could not use it
252 252
   with T1 ! */
253
                  "r" (v), 
254
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), 
255
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), 
253
                  "r" (v),
254
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
255
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
256 256
                  "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),
257 257
                  "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_write)),
258 258
                  "i" (CPU_MEM_INDEX),
......
275 275
    addr = ptr;
276 276
    index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
277 277
    is_user = CPU_MEM_INDEX;
278
    if (__builtin_expect(env->tlb_table[is_user][index].ADDR_READ != 
278
    if (__builtin_expect(env->tlb_table[is_user][index].ADDR_READ !=
279 279
                         (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) {
280 280
        res = glue(glue(__ld, SUFFIX), MMUSUFFIX)(addr, is_user);
281 281
    } else {
......
296 296
    addr = ptr;
297 297
    index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
298 298
    is_user = CPU_MEM_INDEX;
299
    if (__builtin_expect(env->tlb_table[is_user][index].ADDR_READ != 
299
    if (__builtin_expect(env->tlb_table[is_user][index].ADDR_READ !=
300 300
                         (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) {
301 301
        res = (DATA_STYPE)glue(glue(__ld, SUFFIX), MMUSUFFIX)(addr, is_user);
302 302
    } else {
......
321 321
    addr = ptr;
322 322
    index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
323 323
    is_user = CPU_MEM_INDEX;
324
    if (__builtin_expect(env->tlb_table[is_user][index].addr_write != 
324
    if (__builtin_expect(env->tlb_table[is_user][index].addr_write !=
325 325
                         (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) {
326 326
        glue(glue(__st, SUFFIX), MMUSUFFIX)(addr, v, is_user);
327 327
    } else {

Also available in: Unified diff