aboutsummaryrefslogtreecommitdiff
path: root/softmmu_header.h
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-04-15 21:02:09 +0200
committerStefan Weil <sw@weilnetz.de>2012-04-15 21:25:17 +0200
commit23ddbf08bfe3cf3e9d6993bd7918b6c4339ba2bb (patch)
treea92bd75082afea08fe754cb20c9c47f954b79e09 /softmmu_header.h
parent3b2992e42f8945f4bc6b9151f83dbf2bb5bcd538 (diff)
softmmu: Use uintptr_t for physaddr and rename it
Variable physaddr is a host address which should be represented by data type 'uintptr_t'. This is needed for w64 and changes nothing for other hosts. v2: Rename physaddr -> hostaddr (suggested by Blue Swirl). Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'softmmu_header.h')
-rw-r--r--softmmu_header.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/softmmu_header.h b/softmmu_header.h
index 6b72093a0c..289dae2e54 100644
--- a/softmmu_header.h
+++ b/softmmu_header.h
@@ -99,7 +99,6 @@ glue(glue(glue(CPU_PREFIX, ld), USUFFIX), MEMSUFFIX)(ENV_PARAM
int page_index;
RES_TYPE res;
target_ulong addr;
- unsigned long physaddr;
int mmu_idx;
addr = ptr;
@@ -111,8 +110,8 @@ glue(glue(glue(CPU_PREFIX, ld), USUFFIX), MEMSUFFIX)(ENV_PARAM
addr,
mmu_idx);
} else {
- physaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)physaddr);
+ uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
+ res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)hostaddr);
}
return res;
}
@@ -124,7 +123,6 @@ glue(glue(glue(CPU_PREFIX, lds), SUFFIX), MEMSUFFIX)(ENV_PARAM
{
int res, page_index;
target_ulong addr;
- unsigned long physaddr;
int mmu_idx;
addr = ptr;
@@ -135,8 +133,8 @@ glue(glue(glue(CPU_PREFIX, lds), SUFFIX), MEMSUFFIX)(ENV_PARAM
res = (DATA_STYPE)glue(glue(glue(HELPER_PREFIX, ld), SUFFIX),
MMUSUFFIX)(ENV_VAR addr, mmu_idx);
} else {
- physaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- res = glue(glue(lds, SUFFIX), _raw)((uint8_t *)physaddr);
+ uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
+ res = glue(glue(lds, SUFFIX), _raw)((uint8_t *)hostaddr);
}
return res;
}
@@ -152,7 +150,6 @@ glue(glue(glue(CPU_PREFIX, st), SUFFIX), MEMSUFFIX)(ENV_PARAM target_ulong ptr,
{
int page_index;
target_ulong addr;
- unsigned long physaddr;
int mmu_idx;
addr = ptr;
@@ -163,8 +160,8 @@ glue(glue(glue(CPU_PREFIX, st), SUFFIX), MEMSUFFIX)(ENV_PARAM target_ulong ptr,
glue(glue(glue(HELPER_PREFIX, st), SUFFIX), MMUSUFFIX)(ENV_VAR addr, v,
mmu_idx);
} else {
- physaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- glue(glue(st, SUFFIX), _raw)((uint8_t *)physaddr, v);
+ uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
+ glue(glue(st, SUFFIX), _raw)((uint8_t *)hostaddr, v);
}
}