target-arm: introduce tbflag for CPSR.E
Together with the existing tb flag for SCTLR.B, this governs the
endianness of data accesses. Note that TARGET_WORDS_BIGENDIAN is
not used, the two flags are enough because linux-user/main.c
initializes SCTRL.B and CPSR.E correctly.
Similar to bswap_code, the new predicate arm_tbflag_is_data_be only
honors SCTLR.B in user-mode emulation. For system-mode emulation,
SCTLR.B only affects the bottom two bits of the address and all accesses
are little endian.
Now that CPSR.E is handled at translation time, implementing setend will
be trivial.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>