diff options
author | Richard Henderson <rth@twiddle.net> | 2013-08-27 14:09:14 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-09-02 09:08:31 -0700 |
commit | c8f94df5934afd9b2011773aaee0fdef714ff573 (patch) | |
tree | 8ff5f2617dd6e27ffff817ea8600fc423b2b9a1a /tcg | |
parent | e58eb534133f8ccaa957a33a06ccdb9129f2c842 (diff) | |
download | qemu-c8f94df5934afd9b2011773aaee0fdef714ff573.tar.gz qemu-c8f94df5934afd9b2011773aaee0fdef714ff573.tar.bz2 qemu-c8f94df5934afd9b2011773aaee0fdef714ff573.zip |
tcg: Introduce zero and sign-extended versions of load helpers
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/i386/tcg-target.c | 6 | ||||
-rw-r--r-- | tcg/tcg.h | 21 |
2 files changed, 18 insertions, 9 deletions
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index a0cfe88bca..3ee54f18e2 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -1025,9 +1025,9 @@ static void tcg_out_jmp(TCGContext *s, uintptr_t dest) * int mmu_idx, uintptr_t ra) */ static const void * const qemu_ld_helpers[4] = { - helper_ret_ldb_mmu, - helper_ret_ldw_mmu, - helper_ret_ldl_mmu, + helper_ret_ldub_mmu, + helper_ret_lduw_mmu, + helper_ret_ldul_mmu, helper_ret_ldq_mmu, }; @@ -754,15 +754,24 @@ void tcg_out_tb_finalize(TCGContext *s); * Memory helpers that will be used by TCG generated code. */ #ifdef CONFIG_SOFTMMU -uint8_t helper_ret_ldb_mmu(CPUArchState *env, target_ulong addr, - int mmu_idx, uintptr_t retaddr); -uint16_t helper_ret_ldw_mmu(CPUArchState *env, target_ulong addr, - int mmu_idx, uintptr_t retaddr); -uint32_t helper_ret_ldl_mmu(CPUArchState *env, target_ulong addr, - int mmu_idx, uintptr_t retaddr); +/* Value zero-extended to tcg register size. */ +tcg_target_ulong helper_ret_ldub_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); +tcg_target_ulong helper_ret_lduw_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); +tcg_target_ulong helper_ret_ldul_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); uint64_t helper_ret_ldq_mmu(CPUArchState *env, target_ulong addr, int mmu_idx, uintptr_t retaddr); +/* Value sign-extended to tcg register size. */ +tcg_target_ulong helper_ret_ldsb_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); +tcg_target_ulong helper_ret_ldsw_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); +tcg_target_ulong helper_ret_ldsl_mmu(CPUArchState *env, target_ulong addr, + int mmu_idx, uintptr_t retaddr); + void helper_ret_stb_mmu(CPUArchState *env, target_ulong addr, uint8_t val, int mmu_idx, uintptr_t retaddr); void helper_ret_stw_mmu(CPUArchState *env, target_ulong addr, uint16_t val, |