target-arm: introduce tbflag for CPSR.E
commit706a77e50cda53fe4741e65ed1a6479b4d7a4056
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 21 Jun 2014 12:58:19 +0000 (21 14:58 +0200)
committerStefan Weil <sw@weilnetz.de>
Fri, 31 Oct 2014 20:41:00 +0000 (31 21:41 +0100)
tree8e397b8b5f2c869880660337ae78fbf33a3969c4
parent54100b89b9070579b1d9da64f78dfb22ee776e14
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>
target-arm/cpu.h
target-arm/translate.c
target-arm/translate.h