[maemo-developers] Toolchain upgrade? (Was: Instructions cache flush on ARM)
From: Eero Tamminen eero.tamminen at nokia.comDate: Thu May 3 11:57:04 EEST 2007
- Previous message: Toolchain upgrade? (Was: Instructions cache flush on ARM)
- Next message: Xsp pixel-doubling solutions for Nokia 770?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, ext Siarhei Siamashka wrote: > Did you also read Intel docs? Unaligned access has some restrictions > on x86 as well. Do you have an example of some practical case where > hardware unaligned support from ARM11 would work worse than on x86? No. Would be nice if somebody would test it. > The compiler should do the job aligning data for performance reasons > (as it does on x86 as well). But if you happen to have some unaligned > data in memory anyway, just reading it with some minor unavoidable > performance penalty will be faster than reading data one byte at > a time and combining it into a 32-bit or 16-bit value (instructions > timings can be also found in this Technical Reference Manual). > > Enabling hardware unaligned access support should make explicit > pointer conversion hacks that are sometimes used in not very portable > C code work just like they do on x86. Which is a good thing in my > opinion. Same test could check whether the CPU alignment fixup mode has any performance penalty also for aligned operations... > The number of posts asking for help is also nonzero: > http://www.internettablettalk.com/forums/showthread.php?t=2668 What!?! People who are porting/re-making m68k games haven't heard of alignment issues? Where the world is going... Like ARM, M68k required things to be aligned and generated buserror/SIGBUS if they weren't. And these are not the only architectures where things should be aligned. If I remember correctly Alpha (first 64-bit machine I tried almost 10 years ago) required also aligning. > In addition, I remember having explained about alignment issues to a few > people on #maemo channel over all this time, they all came complaining > about applications working on x86 but crashing on ARM. > > So in my opinion this problem really exists, even if it is not so significant. The quality of the developers these days, sigh... ;-) People really should learn to use a compiler, it tells about these issues (signed/unsigned in addition to alignment) when asked. These warnings produce some false positives though, so one doesn't want to keep them on all the time. I'm more concerned about bugs in code being silenty "fixed" (wrong) by the CPU instead of developer getting notified about the issues (with a crash). - Eero
- Previous message: Toolchain upgrade? (Was: Instructions cache flush on ARM)
- Next message: Xsp pixel-doubling solutions for Nokia 770?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]