Revision 5fafdf24 target-sparc/op_helper.c
b/target-sparc/op_helper.c | ||
---|---|---|
9 | 9 |
{ |
10 | 10 |
env->exception_index = tt; |
11 | 11 |
cpu_loop_exit(); |
12 |
}
|
|
12 |
} |
|
13 | 13 |
|
14 | 14 |
void check_ieee_exceptions() |
15 | 15 |
{ |
... | ... | |
137 | 137 |
GEN_FCMP(fcmped_fcc3, float64, DT0, DT1, 26, 1); |
138 | 138 |
#endif |
139 | 139 |
|
140 |
#if defined(CONFIG_USER_ONLY)
|
|
140 |
#if defined(CONFIG_USER_ONLY) |
|
141 | 141 |
void helper_ld_asi(int asi, int size, int sign) |
142 | 142 |
{ |
143 | 143 |
} |
... | ... | |
173 | 173 |
case 4: /* read MMU regs */ |
174 | 174 |
{ |
175 | 175 |
int reg = (T0 >> 8) & 0xf; |
176 |
|
|
176 |
|
|
177 | 177 |
ret = env->mmuregs[reg]; |
178 | 178 |
if (reg == 3) /* Fault status cleared on read */ |
179 | 179 |
env->mmuregs[reg] = 0; |
... | ... | |
291 | 291 |
{ |
292 | 292 |
int reg = (T0 >> 8) & 0xf; |
293 | 293 |
uint32_t oldreg; |
294 |
|
|
294 |
|
|
295 | 295 |
oldreg = env->mmuregs[reg]; |
296 | 296 |
switch(reg) { |
297 | 297 |
case 0: |
... | ... | |
342 | 342 |
// copy 32 bytes |
343 | 343 |
unsigned int i; |
344 | 344 |
uint32_t src = T1 & ~3, dst = T0 & ~3, temp; |
345 |
|
|
345 |
|
|
346 | 346 |
for (i = 0; i < 32; i += 4, src += 4, dst += 4) { |
347 | 347 |
temp = ldl_kernel(src); |
348 | 348 |
stl_kernel(dst, temp); |
... | ... | |
489 | 489 |
case 0x56: // I-MMU tag read |
490 | 490 |
{ |
491 | 491 |
unsigned int i; |
492 |
|
|
492 |
|
|
493 | 493 |
for (i = 0; i < 64; i++) { |
494 | 494 |
// Valid, ctx match, vaddr match |
495 | 495 |
if ((env->itlb_tte[i] & 0x8000000000000000ULL) != 0 && |
... | ... | |
510 | 510 |
case 0x5e: // D-MMU tag read |
511 | 511 |
{ |
512 | 512 |
unsigned int i; |
513 |
|
|
513 |
|
|
514 | 514 |
for (i = 0; i < 64; i++) { |
515 | 515 |
// Valid, ctx match, vaddr match |
516 | 516 |
if ((env->dtlb_tte[i] & 0x8000000000000000ULL) != 0 && |
... | ... | |
605 | 605 |
{ |
606 | 606 |
int reg = (T0 >> 3) & 0xf; |
607 | 607 |
uint64_t oldreg; |
608 |
|
|
608 |
|
|
609 | 609 |
oldreg = env->immuregs[reg]; |
610 | 610 |
switch(reg) { |
611 | 611 |
case 0: // RO |
... | ... | |
672 | 672 |
{ |
673 | 673 |
int reg = (T0 >> 3) & 0xf; |
674 | 674 |
uint64_t oldreg; |
675 |
|
|
675 |
|
|
676 | 676 |
oldreg = env->dmmuregs[reg]; |
677 | 677 |
switch(reg) { |
678 | 678 |
case 0: // RO |
... | ... | |
768 | 768 |
raise_exception(TT_ILL_INSN); |
769 | 769 |
|
770 | 770 |
env->psret = 1; |
771 |
cwp = (env->cwp + 1) & (NWINDOWS - 1);
|
|
771 |
cwp = (env->cwp + 1) & (NWINDOWS - 1); |
|
772 | 772 |
if (env->wim & (1 << cwp)) { |
773 | 773 |
raise_exception(TT_WIN_UNF); |
774 | 774 |
} |
... | ... | |
949 | 949 |
count++; |
950 | 950 |
} |
951 | 951 |
#endif |
952 |
#if !defined(CONFIG_USER_ONLY)
|
|
952 |
#if !defined(CONFIG_USER_ONLY) |
|
953 | 953 |
if (env->tl == MAXTL) { |
954 | 954 |
cpu_abort(env, "Trap 0x%04x while trap level is MAXTL, Error state", env->exception_index); |
955 | 955 |
return; |
... | ... | |
1010 | 1010 |
count++; |
1011 | 1011 |
} |
1012 | 1012 |
#endif |
1013 |
#if !defined(CONFIG_USER_ONLY)
|
|
1013 |
#if !defined(CONFIG_USER_ONLY) |
|
1014 | 1014 |
if (env->psret == 0) { |
1015 | 1015 |
cpu_abort(env, "Trap 0x%02x while interrupts disabled, Error state", env->exception_index); |
1016 | 1016 |
return; |
1017 | 1017 |
} |
1018 | 1018 |
#endif |
1019 | 1019 |
env->psret = 0; |
1020 |
cwp = (env->cwp - 1) & (NWINDOWS - 1);
|
|
1020 |
cwp = (env->cwp - 1) & (NWINDOWS - 1); |
|
1021 | 1021 |
set_cwp(cwp); |
1022 | 1022 |
env->regwptr[9] = env->pc; |
1023 | 1023 |
env->regwptr[10] = env->npc; |
... | ... | |
1030 | 1030 |
} |
1031 | 1031 |
#endif |
1032 | 1032 |
|
1033 |
#if !defined(CONFIG_USER_ONLY)
|
|
1033 |
#if !defined(CONFIG_USER_ONLY) |
|
1034 | 1034 |
|
1035 | 1035 |
static void do_unaligned_access(target_ulong addr, int is_write, int is_user, |
1036 | 1036 |
void *retaddr); |
Also available in: Unified diff