Il 22/01/14 16:38, Jonathan Schleifer ha scritto:
Am 22.01.2014 um 16:32 schrieb François Revol <revol@xxxxxxx>:Now, I'm not sure about ARM though but I think we can probably hide most of the tweaks in system libs.Well, for ARM, a vendor does not make that much sense, but we do need some extra defines for it. E.g. ARMv5 can’t handle Thumb, but there are Thumb versions of ARMv5. And that even is a problem if we don’t use Thumb: Code that should be able to work together with Thumb code needs to be Thumb aware, e.g. need bx instead of b. But bx only exists on CPUs with Thumb. Or ARMv6 can’t handle movw/movt and many other new instructions of ARMv7. If you target ARMv7, movw and movt are used all over the place.
All these differences are meaningless to generic (most?) C++ developers. If someone wants to know if a specific feature is present he shouldn't rely on the vendor or even the architecture, but a more powerful checking routine, to make the code more future-proof. What about a is_cpu_feature_available() function?
Gabriele