As reported by Chris Foreman at Ars Technica, code strings related to Marvell’s ARM-based quad-core CPUs have been found in the latest source code of Clang, Apple’s compiler for Xcode. Specifically, Ars Technica notes Clang shows support for Marvell’s Armada XP processor with an “undefined” open source flag, suggesting that only Apple can internally build code targeted towards such CPU.
A developer who works on low-level ARM assembly coding for security products was the first to alert Ars that support had been added for Armada’s Cortex A9-compatible processors in the latest version of Xcode (a claim that we later confirmed first-hand). The source code for a part of Clang that interprets what CPU type is being targeted for optimization includes a definition for an architecture type of “armv7k” and CPU type “pj4b”. PJ4B is a specially optimized CPU design used in Marvell’s quad-core Armada XP embedded processors. Source code available from the LLVM project, including Apple-specific branches, doesn’t contain any reference to the Marvell design.
There are a number of reasons why Apple would like to test support for ARM-based quad-core CPUs. First is low-power consumption, a characteristic of ARM architectures that has allowed Apple to build mobile devices with amazing battery life. Second is performance – just like the dual-core A5 provides faster graphics and performances than the first-gen A4, it wouldn’t be a surprise to know Apple is testing quad-core processors for the next generation of phones and tablets. On the other hand, the MacBook Airs were rumored earlier this year to be considered as the first Mac model to switch to ARM (again, the rumors mentioned battery life, extreme portability, and other often-quoted ARM advantages), although such transition would require developers to update their OS X applications to work with ARM, possibly only on MacBook Airs to start with. Many doubt Apple will switch Macs to ARM in the short term, especially considering Intel’s upcoming Ivi Bridge and Haswell processors (supposed to tackle the battery life and power consumption issues).
It’s interesting to note, however, that Apple is at least testing ARM-based quad-core CPUs internally, and that these references have made it into Clang’s source code.