3 ms·
I'm guessing there isn't any way to simulate big endian on x86?
by dataflow 3y ago
I'm guessing there isn't any way to simulate big endian on x86?
- deleted 3y ago[deleted]
- JonChesterfield 3y agoA compiler could do that - involves inserting bswap on the way to/from memory, might also be a worthwhile flag for big endian machines that want to execute code that assumes little endian load/stores. I don't know of an implementation of such though.
- o11c 3y agoGCC has `__attribute__((scalar_storage_order("big-endian")))`. Note that the attribute is applied on `struct`s (and `union`s), taking effect for scalars within them, but does not recurse into further aggregates.