diff options
author | Richard Henderson | 2015-05-13 20:25:20 +0200 |
---|---|---|
committer | Richard Henderson | 2015-05-14 21:15:18 +0200 |
commit | dfb36305626636e2e07e0c5acd3a002a5419399e (patch) | |
tree | 5fb7817c8d37d5a0c22316ee398749ef244ce881 /tcg | |
parent | tcg: Push merged memop+mmu_idx parameter to softmmu routines (diff) | |
download | qemu-dfb36305626636e2e07e0c5acd3a002a5419399e.tar.gz qemu-dfb36305626636e2e07e0c5acd3a002a5419399e.tar.xz qemu-dfb36305626636e2e07e0c5acd3a002a5419399e.zip |
tcg: Add MO_ALIGN, MO_UNALN
These modifiers control, on a per-memory-op basis, whether
unaligned memory accesses are allowed. The default setting
reflects the target's definition of ALIGNED_ONLY.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -241,6 +241,19 @@ typedef enum TCGMemOp { MO_TE = MO_LE, #endif + /* MO_UNALN accesses are never checked for alignment. + MO_ALIGN accesses will result in a call to the CPU's + do_unaligned_access hook if the guest address is not aligned. + The default depends on whether the target CPU defines ALIGNED_ONLY. */ + MO_AMASK = 16, +#ifdef ALIGNED_ONLY + MO_ALIGN = 0, + MO_UNALN = MO_AMASK, +#else + MO_ALIGN = MO_AMASK, + MO_UNALN = 0, +#endif + /* Combinations of the above, for ease of use. */ MO_UB = MO_8, MO_UW = MO_16, |