![]() ![]() Itanium processors (which I believe were always called IA 64, not IA32 but I could be wrong) have the ability to run in big-endian but Windows doesn't support it. I have yet to hear of any compiler or software that can detect bi-endian issues.Īs far as I'm aware there are no desktop or server versions of windows that support big-endian. Then compile and run the code on your favorite Linux flavor that supports big-endian and see if it works. ![]() I wouldn't even spend the time checking the endianness in that case.ī) If you want to check bi-endian support of your code I recommend splitting it into libraries that are themselves cross platform compilable. So I'm interested in knowing (a) if it's even necessary to do these checks since Windows doesn't ordinarily run on little-endian platforms (today anyway), and (b) how I could possibly test my code, seeing as I can't think of a way to run Windows on a big-endian architecture, and manually reversing all the multibyte values on disk still involves a manual process that I might well screw up.Ī) No it is not necessary to check endianness if your sole target is Windows x86 or 圆4. The problem is, I don't know if I might have missed one or more of those places where I needed to do a conversion and the easiest way to see if I screwed up is to run the program on a big-endian architecture. Is this observation accurate, and if so, is it generally acceptable to make the assumption that Windows will always be running on little-endian hardware? Additionally, is it even possible (in 2011) to run Windows on a big-endian emulator or something, such that one could even test for endianness issues?Įdit: For additional clarity, the way my code currently works, I do an endianness check at startup time, and then every time I load a value off the disk, I run it through an inline function that uses an intrinsic to change endianness if the architecture is big-endian. However, I find myself wondering if I even need to worry about endianness conversions, since as far as I can tell, desktop Windows only supports little-endian architectures (IA32, x86-84, etc.), and therefore, the on-disk little-endian values are perfectly fine sans conversion. ![]() I'm writing a userspace filesystem driver on Windows and endianness conversions are something I've been dealing with, as this particular filesystem always stores values in little-endian format and the driver is expected to convert them (if necessary) for the CPU it's running on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |