aboutsummaryrefslogtreecommitdiff
path: root/include/exec/cpu_ldst_template.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-01-20 16:19:58 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-01-20 16:19:58 +0000
commit699eae17b841e6784dc3864bf357e26bff1e9dfe (patch)
tree3f46b5de6be3f2033fb67b4d93bb031a98d8e69a /include/exec/cpu_ldst_template.h
parenta5bd4470ed34b7cf49bda7ea3dcad3a269c99ada (diff)
parentde5ee4a888667ca0a198f0743d70075d70564117 (diff)
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20150120' into staging
Miscellaneous cross-tree patches: * load/store helper cleanup * drop TARGET_HAS_ICE define and checks * scripts/qapi-types.py: Add dummy member to empty structs * cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined # gpg: Signature made Tue 20 Jan 2015 15:43:38 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-misc-20150120: cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors cpu_ldst.h: Drop unused _raw macros, saddr() and laddr() cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors cpu_ldst.h: Remove unused very short ld*/st* defines cpu_ldst.h: Drop unused ld/st*_kernel defines target-mips: Don't use _raw load/store accessors linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c bsd-user/elfload.c: Don't use ldl() or ldq_raw() linux-user/elfload.c: Don't use _raw accessor functions target-sparc: Don't use {ld, st}*_raw functions monitor.c: Use ld*_p() instead of ld*_raw() cpu_ldst.h: Remove unused ldul_ macros exec.c: Drop TARGET_HAS_ICE define and checks scripts/qapi-types.py: Add dummy member to empty structs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec/cpu_ldst_template.h')
-rw-r--r--include/exec/cpu_ldst_template.h60
1 files changed, 4 insertions, 56 deletions
diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h
index 006093ac49..95ab7504e2 100644
--- a/include/exec/cpu_ldst_template.h
+++ b/include/exec/cpu_ldst_template.h
@@ -4,9 +4,7 @@
* Generate inline load/store functions for one MMU mode and data
* size.
*
- * Generate a store function as well as signed and unsigned loads. For
- * 32 and 64 bit cases, also generate floating point functions with
- * the same size.
+ * Generate a store function as well as signed and unsigned loads.
*
* Not used directly but included from cpu_ldst.h.
*
@@ -79,7 +77,7 @@ glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr)
res = glue(glue(helper_ld, SUFFIX), MMUSUFFIX)(env, addr, mmu_idx);
} else {
uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- res = glue(glue(ld, USUFFIX), _raw)(hostaddr);
+ res = glue(glue(ld, USUFFIX), _p)((uint8_t *)hostaddr);
}
return res;
}
@@ -101,7 +99,7 @@ glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr)
MMUSUFFIX)(env, addr, mmu_idx);
} else {
uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- res = glue(glue(lds, SUFFIX), _raw)(hostaddr);
+ res = glue(glue(lds, SUFFIX), _p)((uint8_t *)hostaddr);
}
return res;
}
@@ -127,60 +125,10 @@ glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr,
glue(glue(helper_st, SUFFIX), MMUSUFFIX)(env, addr, v, mmu_idx);
} else {
uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend;
- glue(glue(st, SUFFIX), _raw)(hostaddr, v);
+ glue(glue(st, SUFFIX), _p)((uint8_t *)hostaddr, v);
}
}
-
-
-#if DATA_SIZE == 8
-static inline float64 glue(cpu_ldfq, MEMSUFFIX)(CPUArchState *env,
- target_ulong ptr)
-{
- union {
- float64 d;
- uint64_t i;
- } u;
- u.i = glue(cpu_ldq, MEMSUFFIX)(env, ptr);
- return u.d;
-}
-
-static inline void glue(cpu_stfq, MEMSUFFIX)(CPUArchState *env,
- target_ulong ptr, float64 v)
-{
- union {
- float64 d;
- uint64_t i;
- } u;
- u.d = v;
- glue(cpu_stq, MEMSUFFIX)(env, ptr, u.i);
-}
-#endif /* DATA_SIZE == 8 */
-
-#if DATA_SIZE == 4
-static inline float32 glue(cpu_ldfl, MEMSUFFIX)(CPUArchState *env,
- target_ulong ptr)
-{
- union {
- float32 f;
- uint32_t i;
- } u;
- u.i = glue(cpu_ldl, MEMSUFFIX)(env, ptr);
- return u.f;
-}
-
-static inline void glue(cpu_stfl, MEMSUFFIX)(CPUArchState *env,
- target_ulong ptr, float32 v)
-{
- union {
- float32 f;
- uint32_t i;
- } u;
- u.f = v;
- glue(cpu_stl, MEMSUFFIX)(env, ptr, u.i);
-}
-#endif /* DATA_SIZE == 4 */
-
#endif /* !SOFTMMU_CODE_ACCESS */
#undef RES_TYPE