This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to set endianness in ARM Cortex-A8

Hi,actually i need to run big endian code but i don't know how to set endian option in cp15 registers could any suggest me how to set EE bit set

Parents
  • How do you think about the idea?

    It's a very expensive way of doing it. If you are going to do functions to load single fields from memory then just use little-endian loads and use the "rev" instruction to reverse the result - it's only one additional instruction and much faster (and small enough to be inlined so you avoid the function overhead too).

    It's only worth switching the whole processor data endianness if you are going to load a large block of data, and want to avoid executing hundreds of instructions to reverse the data.

    Pete

Reply
  • How do you think about the idea?

    It's a very expensive way of doing it. If you are going to do functions to load single fields from memory then just use little-endian loads and use the "rev" instruction to reverse the result - it's only one additional instruction and much faster (and small enough to be inlined so you avoid the function overhead too).

    It's only worth switching the whole processor data endianness if you are going to load a large block of data, and want to avoid executing hundreds of instructions to reverse the data.

    Pete

Children
No data