[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/18] cpu_ldst_template.h: Use ld*_p directly rather
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 14/18] cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros |
Date: |
Tue, 20 Jan 2015 15:45:43 +0000 |
The ld*_raw and st*_raw macros are now only used within the code
produced by cpu_ldst_template.h, and only in three places.
Expand these out to just call the ld_p and st_p functions directly.
Note that in all the callsites the address argument is a uintptr_t,
so we can drop that part of the double-cast used in the saddr() and
laddr() macros.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden
---
include/exec/cpu_ldst_template.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h
index 006093a..3b53605 100644
--- a/include/exec/cpu_ldst_template.h
+++ b/include/exec/cpu_ldst_template.h
@@ -79,7 +79,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 +101,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,7 +127,7 @@ 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);
}
}
--
1.9.1
- [Qemu-devel] [PULL 00/18] misc cross-tree patches queue, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 01/18] scripts/qapi-types.py: Add dummy member to empty structs, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 18/18] cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 16/18] cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 15/18] cpu_ldst.h: Drop unused _raw macros, saddr() and laddr(), Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 14/18] cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros,
Peter Maydell <=
- [Qemu-devel] [PULL 10/18] target-mips: Don't use _raw load/store accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 09/18] linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 13/18] cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 06/18] linux-user/elfload.c: Don't use _raw accessor functions, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 08/18] linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 17/18] cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 05/18] target-sparc: Don't use {ld, st}*_raw functions, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 04/18] monitor.c: Use ld*_p() instead of ld*_raw(), Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 03/18] cpu_ldst.h: Remove unused ldul_ macros, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 12/18] cpu_ldst.h: Remove unused very short ld*/st* defines, Peter Maydell, 2015/01/20