提交 701eed4b 编写于 作者: B Blue Swirl

Sparc32: remove unused variable, spotted by clang

Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 cb95c2e4
...@@ -107,12 +107,10 @@ static int get_physical_address(CPUState *env, target_phys_addr_t *physical, ...@@ -107,12 +107,10 @@ static int get_physical_address(CPUState *env, target_phys_addr_t *physical,
int access_perms = 0; int access_perms = 0;
target_phys_addr_t pde_ptr; target_phys_addr_t pde_ptr;
uint32_t pde; uint32_t pde;
target_ulong virt_addr;
int error_code = 0, is_dirty, is_user; int error_code = 0, is_dirty, is_user;
unsigned long page_offset; unsigned long page_offset;
is_user = mmu_idx == MMU_USER_IDX; is_user = mmu_idx == MMU_USER_IDX;
virt_addr = address & TARGET_PAGE_MASK;
if ((env->mmuregs[0] & MMU_E) == 0) { /* MMU disabled */ if ((env->mmuregs[0] & MMU_E) == 0) { /* MMU disabled */
// Boot mode: instruction fetches are taken from PROM // Boot mode: instruction fetches are taken from PROM
...@@ -174,18 +172,15 @@ static int get_physical_address(CPUState *env, target_phys_addr_t *physical, ...@@ -174,18 +172,15 @@ static int get_physical_address(CPUState *env, target_phys_addr_t *physical,
case 3: /* Reserved */ case 3: /* Reserved */
return (3 << 8) | (4 << 2); return (3 << 8) | (4 << 2);
case 2: /* L3 PTE */ case 2: /* L3 PTE */
virt_addr = address & TARGET_PAGE_MASK;
page_offset = (address & TARGET_PAGE_MASK) & page_offset = (address & TARGET_PAGE_MASK) &
(TARGET_PAGE_SIZE - 1); (TARGET_PAGE_SIZE - 1);
} }
break; break;
case 2: /* L2 PTE */ case 2: /* L2 PTE */
virt_addr = address & ~0x3ffff;
page_offset = address & 0x3ffff; page_offset = address & 0x3ffff;
} }
break; break;
case 2: /* L1 PTE */ case 2: /* L1 PTE */
virt_addr = address & ~0xffffff;
page_offset = address & 0xffffff; page_offset = address & 0xffffff;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册