Revision 108c49b8 softmmu_template.h

b/softmmu_template.h
48 48
static DATA_TYPE glue(glue(slow_ld, SUFFIX), MMUSUFFIX)(target_ulong addr, 
49 49
                                                        int is_user,
50 50
                                                        void *retaddr);
51
static inline DATA_TYPE glue(io_read, SUFFIX)(unsigned long physaddr, 
51
static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr, 
52 52
                                              target_ulong tlb_addr)
53 53
{
54 54
    DATA_TYPE res;
......
76 76
    DATA_TYPE res;
77 77
    int index;
78 78
    target_ulong tlb_addr;
79
    unsigned long physaddr;
79
    target_phys_addr_t physaddr;
80 80
    void *retaddr;
81 81
    
82 82
    /* test if there is match for unaligned or IO access */
......
99 99
                                                         is_user, retaddr);
100 100
        } else {
101 101
            /* unaligned access in the same page */
102
            res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)physaddr);
102
            res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)(long)physaddr);
103 103
        }
104 104
    } else {
105 105
        /* the page is not in the TLB : fill it */
......
117 117
{
118 118
    DATA_TYPE res, res1, res2;
119 119
    int index, shift;
120
    unsigned long physaddr;
120
    target_phys_addr_t physaddr;
121 121
    target_ulong tlb_addr, addr1, addr2;
122 122

  
123 123
    index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
......
148 148
            res = (DATA_TYPE)res;
149 149
        } else {
150 150
            /* unaligned/aligned access in the same page */
151
            res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)physaddr);
151
            res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)(long)physaddr);
152 152
        }
153 153
    } else {
154 154
        /* the page is not in the TLB : fill it */
......
165 165
                                                   int is_user,
166 166
                                                   void *retaddr);
167 167

  
168
static inline void glue(io_write, SUFFIX)(unsigned long physaddr, 
168
static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr, 
169 169
                                          DATA_TYPE val,
170 170
                                          target_ulong tlb_addr,
171 171
                                          void *retaddr)
......
192 192
                                                    DATA_TYPE val,
193 193
                                                    int is_user)
194 194
{
195
    unsigned long physaddr;
195
    target_phys_addr_t physaddr;
196 196
    target_ulong tlb_addr;
197 197
    void *retaddr;
198 198
    int index;
......
215 215
                                                   is_user, retaddr);
216 216
        } else {
217 217
            /* aligned/unaligned access in the same page */
218
            glue(glue(st, SUFFIX), _raw)((uint8_t *)physaddr, val);
218
            glue(glue(st, SUFFIX), _raw)((uint8_t *)(long)physaddr, val);
219 219
        }
220 220
    } else {
221 221
        /* the page is not in the TLB : fill it */
......
231 231
                                                   int is_user,
232 232
                                                   void *retaddr)
233 233
{
234
    unsigned long physaddr;
234
    target_phys_addr_t physaddr;
235 235
    target_ulong tlb_addr;
236 236
    int index, i;
237 237

  
......
259 259
            }
260 260
        } else {
261 261
            /* aligned/unaligned access in the same page */
262
            glue(glue(st, SUFFIX), _raw)((uint8_t *)physaddr, val);
262
            glue(glue(st, SUFFIX), _raw)((uint8_t *)(long)physaddr, val);
263 263
        }
264 264
    } else {
265 265
        /* the page is not in the TLB : fill it */

Also available in: Unified diff