sparc64: use symbolic name for MMU index v1

- use symbolic name for MMU index
v0->v1:
- change debug traces to DPRINTF_MMU
- fix debug trace function names

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Igor V. Kovalenko 2010-06-02 23:39:09 +04:00 committed by Blue Swirl
parent fe987e2394
commit b219094ace

View File

@ -3321,18 +3321,19 @@ void helper_stdf(target_ulong addr, int mem_idx)
helper_check_align(addr, 7); helper_check_align(addr, 7);
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
switch (mem_idx) { switch (mem_idx) {
case 0: case MMU_USER_IDX:
stfq_user(addr, DT0); stfq_user(addr, DT0);
break; break;
case 1: case MMU_KERNEL_IDX:
stfq_kernel(addr, DT0); stfq_kernel(addr, DT0);
break; break;
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
case 2: case MMU_HYPV_IDX:
stfq_hypv(addr, DT0); stfq_hypv(addr, DT0);
break; break;
#endif #endif
default: default:
DPRINTF_MMU("helper_stdf: need to check MMU idx %d\n", mem_idx);
break; break;
} }
#else #else
@ -3345,18 +3346,19 @@ void helper_lddf(target_ulong addr, int mem_idx)
helper_check_align(addr, 7); helper_check_align(addr, 7);
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
switch (mem_idx) { switch (mem_idx) {
case 0: case MMU_USER_IDX:
DT0 = ldfq_user(addr); DT0 = ldfq_user(addr);
break; break;
case 1: case MMU_KERNEL_IDX:
DT0 = ldfq_kernel(addr); DT0 = ldfq_kernel(addr);
break; break;
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
case 2: case MMU_HYPV_IDX:
DT0 = ldfq_hypv(addr); DT0 = ldfq_hypv(addr);
break; break;
#endif #endif
default: default:
DPRINTF_MMU("helper_lddf: need to check MMU idx %d\n", mem_idx);
break; break;
} }
#else #else
@ -3372,24 +3374,25 @@ void helper_ldqf(target_ulong addr, int mem_idx)
helper_check_align(addr, 7); helper_check_align(addr, 7);
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
switch (mem_idx) { switch (mem_idx) {
case 0: case MMU_USER_IDX:
u.ll.upper = ldq_user(addr); u.ll.upper = ldq_user(addr);
u.ll.lower = ldq_user(addr + 8); u.ll.lower = ldq_user(addr + 8);
QT0 = u.q; QT0 = u.q;
break; break;
case 1: case MMU_KERNEL_IDX:
u.ll.upper = ldq_kernel(addr); u.ll.upper = ldq_kernel(addr);
u.ll.lower = ldq_kernel(addr + 8); u.ll.lower = ldq_kernel(addr + 8);
QT0 = u.q; QT0 = u.q;
break; break;
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
case 2: case MMU_HYPV_IDX:
u.ll.upper = ldq_hypv(addr); u.ll.upper = ldq_hypv(addr);
u.ll.lower = ldq_hypv(addr + 8); u.ll.lower = ldq_hypv(addr + 8);
QT0 = u.q; QT0 = u.q;
break; break;
#endif #endif
default: default:
DPRINTF_MMU("helper_ldqf: need to check MMU idx %d\n", mem_idx);
break; break;
} }
#else #else
@ -3407,24 +3410,25 @@ void helper_stqf(target_ulong addr, int mem_idx)
helper_check_align(addr, 7); helper_check_align(addr, 7);
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
switch (mem_idx) { switch (mem_idx) {
case 0: case MMU_USER_IDX:
u.q = QT0; u.q = QT0;
stq_user(addr, u.ll.upper); stq_user(addr, u.ll.upper);
stq_user(addr + 8, u.ll.lower); stq_user(addr + 8, u.ll.lower);
break; break;
case 1: case MMU_KERNEL_IDX:
u.q = QT0; u.q = QT0;
stq_kernel(addr, u.ll.upper); stq_kernel(addr, u.ll.upper);
stq_kernel(addr + 8, u.ll.lower); stq_kernel(addr + 8, u.ll.lower);
break; break;
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
case 2: case MMU_HYPV_IDX:
u.q = QT0; u.q = QT0;
stq_hypv(addr, u.ll.upper); stq_hypv(addr, u.ll.upper);
stq_hypv(addr + 8, u.ll.lower); stq_hypv(addr + 8, u.ll.lower);
break; break;
#endif #endif
default: default:
DPRINTF_MMU("helper_stqf: need to check MMU idx %d\n", mem_idx);
break; break;
} }
#else #else