Revision 21d2beaa target-alpha/helper.c

b/target-alpha/helper.c
168 168
    return 1;
169 169
}
170 170
#else
171
void swap_shadow_regs(CPUState *env)
172
{
173
    uint64_t i0, i1, i2, i3, i4, i5, i6, i7;
174

  
175
    i0 = env->ir[8];
176
    i1 = env->ir[9];
177
    i2 = env->ir[10];
178
    i3 = env->ir[11];
179
    i4 = env->ir[12];
180
    i5 = env->ir[13];
181
    i6 = env->ir[14];
182
    i7 = env->ir[25];
183

  
184
    env->ir[8]  = env->shadow[0];
185
    env->ir[9]  = env->shadow[1];
186
    env->ir[10] = env->shadow[2];
187
    env->ir[11] = env->shadow[3];
188
    env->ir[12] = env->shadow[4];
189
    env->ir[13] = env->shadow[5];
190
    env->ir[14] = env->shadow[6];
191
    env->ir[25] = env->shadow[7];
192

  
193
    env->shadow[0] = i0;
194
    env->shadow[1] = i1;
195
    env->shadow[2] = i2;
196
    env->shadow[3] = i3;
197
    env->shadow[4] = i4;
198
    env->shadow[5] = i5;
199
    env->shadow[6] = i6;
200
    env->shadow[7] = i7;
201
}
202

  
171 203
target_phys_addr_t cpu_get_phys_page_debug (CPUState *env, target_ulong addr)
172 204
{
173 205
    return -1;
......
290 322
    env->pc = env->palbr + i;
291 323

  
292 324
    /* Switch to PALmode.  */
293
    env->pal_mode = 1;
325
    if (!env->pal_mode) {
326
        env->pal_mode = 1;
327
        swap_shadow_regs(env);
328
    }
294 329
#endif /* !USER_ONLY */
295 330
}
296 331

  

Also available in: Unified diff