Software > Applications and Porting

[DEV] Is there any tool to detect the logic that might be impacted by endianess?

<< < (2/3) > >>

tle:

--- Quote from: TimKelly on September 19, 2025, 03:48:22 am ---

--- Quote from: tle on September 17, 2025, 11:12:01 am ---
Most of the time I would not get any error but likely run into unexpected behaviour when running the game or apps.

--- End quote ---

Your verbs are unclear - "would not" and "likely run into" are future tense, as in, you are projecting what might occur.  Are you saying the entire code base compiled but has odd behavior when running in Big-endian mode?

If you can compile the source code, run it in Little-endian mode and see if the same unexpected behaviors are present.

--- End quote ---

Yes, I do project there are potential issue if the app is complex. Sometimes the app just crash early on, but sometimes it does not. The latter scenario can be real pain if applications are lacking of tests. I agree with you that one could always do comparison with ppc64le version. My question is simply curiosity if there is any tool that could analyze the codes / assembly / bytecodes to pick up places that might susceptible to endianness issue

TimKelly:
My thought is that endianness is so intrinsic to vector register function that scenes would not even render.  That is why any code that is expected to be portable would use compiler intrinsics to handle vector functions or any direct access to memory, as ClassicHasClass suggested. 

In my experience, just getting "portable" code to compile is an achievement.  I'd worry about it actually working later.  You might be worrying about a problem you don't actually have to solve right now.

Then again, I am not a fan of Asinine Intelligence, and my views are biased towards Actual Intelligence, so I probably should not be responding  :)

TimKelly:
I thought about this a bit more and maybe the authors of DOOM3 use their own vector intrinsics.  If you are wanting to port to big-endian, but they are using little-endian GPU-based vector registers, that would be where I would look for serious endian issues.  If I was hunting this down, I would be grepping for "vector" or "GPU" and looking to see what header files pop up.

ClassicHasClass:
I don't recall if Doom 3 did, but I know Quake 4 and Prey ran on the Power Mac G5 - I played both of them on my Quad - so the engine (at least at some point) was definitely endian-neutral.

Hasturtium:
Doom 3 as released circa 2004 is endian-neutral and has Altivec/VMX optimizations, yes. But Doom 3 BFG Edition - a later remastering of the game with an updated OpenGL implementation and engine - is a different animal outright. tle's probably right about there being problems.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version