processor_info_v2
interface.
Many modern processors support mixed endian as well as separate data
and instruction endianness. This interface reports endianness separately
for data and instructions dynamically, not just the default as for the
processor_info_v2
. Previously endianness has been static,
with only one endianness. With newer ARM processors this may cause issues
for some Big Endian use cases since Little Endian is assumed throughout.
Primarily due to the fact that they can have separate data and instruction
endianness. Modifying the existing processor_info_v2
easily
gets complicated due to dependencies, so a new interface
processor_endian
was created.
The processor_endian_interface_t
interface can be
implemented by processors models and returns the current endianness
of the system.
The function get_instruction_endian returns the active instruction endianness of the processor.
The function get_data_endian returns endianness of data.
SIM_INTERFACE(processor_endian) { cpu_endian_t (*get_instruction_endian)(conf_object_t *obj); cpu_endian_t (*get_data_endian)(conf_object_t *obj); }; #define PROCESSOR_ENDIAN_INTERFACE "processor_endian"
get_instruction_endian | Cell Context |
get_data_endian | Cell Context |