Peter Maydell <peter.mayd...@linaro.org> writes: > On 12 July 2013 23:50, Benjamin Herrenschmidt <b...@kernel.crashing.org> > wrote: >> Our experience is that it actually works fine for almost everything >> except virtio :-) ie mostly TARGET_WORDS_BIGENDIAN is irrelevant (and >> should be). > > I agree that TARGET_WORDS_BIGENDIAN *should* go away, but > it exists currently. Do you actually implement a CPU which > does dynamic endianness flipping?
TCG already supports bi-endianness for PPC. Grep for 'le_mode' in target-ppc/translate.c to see how the TCG instruction stream is affected by it. On PPC, le_mode only really affects load/stores and instruction decoding. Any shared data structures between the CPU and OS remain big endian. So TARGET_WORDS_BIGENDIAN is still accurate even when le_mode=1. It's not the semantic equivalent of changing TARGET_WORDS. Regards, Anthony Liguori > Is it at all efficient > in the config which is the opposite of whatever > TARGET_WORDS_BIGENDIAN says? > > thanks > -- PMM