diff options
author | Richard Henderson <rth@twiddle.net> | 2015-05-13 11:25:20 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2015-05-14 12:15:18 -0700 |
commit | dfb36305626636e2e07e0c5acd3a002a5419399e (patch) | |
tree | 5fb7817c8d37d5a0c22316ee398749ef244ce881 /tcg/tcg.h | |
parent | 3972ef6f830d65e9bacbd31257abedc055fd6dc8 (diff) | |
download | qemu-dfb36305626636e2e07e0c5acd3a002a5419399e.tar.gz qemu-dfb36305626636e2e07e0c5acd3a002a5419399e.tar.bz2 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/tcg.h')
-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, |