News for hackers. Stuff that matters.
Re:A few things iOS developers ought to know about the ARM a... by antichaos on Monday July 19, 2010 @02:43AM (#1527828)
Key takeaways:

- ARM is a little-endian, 32-bit RISC architecture widely used by mobile devices.

- The original iPhone's core processor is ARM1176JZF-S (aka ARM11) which implements an instruction set called ARMv6.

- iPhone 3GS and later models use the Cortex A8 processor core that implements ARMv7, a newer instruction set.

- The so-called A4 processor is in fact a bundle of the Cortex A8 core and several other systems-on-a-chip components including the graphics accelerator and audio/video codecs.

- To take advantage of ARMv7 features while supporting ARMv6, your code must be compiled for both targets and put into a fat binary.

- When you debug optimized ARM code, remember that most ARM instructions can be conditionally executed -- the processor may go through a code block without actually running it.

- Thumb is a compressed subset of ARM instructions. 16-bit thumb code is generally smaller but can not be freely mixed with 32-bit uncompressed ARM code.

- Thumb for ARMv6 has a run-time overhead that makes it undesirable for high-performance apps; however, Thumb for ARMv7 has no such drawbacks and should be turned on by default.

- iOS supports unaligned memory access, but it's slooooow. Don't use it.

- Integer division on ARM is not natively supported. Surprise, surprise!

- GCC sucks at optimizing ARM code, particularly weak at 64-bit integer arithmetic.

Re:A few things iOS developers ought to know about the ARM a... by daeken on Monday July 19, 2010 @07:23AM (#1528268)
> - ARM is a little-endian, 32-bit RISC architecture widely used by mobile devices.

Gotta make a small note here: ARM is bi-endian (bytesexual, if you will); you can toggle the endianness from the lowest level. It just happens that iOS uses it as little endian. I seem to remember the baseband chip (which is also an ARM core, at least with the original iPhone -- never dealt with the others) being big endian, in fact.

Sadly, you can't do this on a per-process level, IIRC, like you can with PowerPC (a huuuuge perk for emulators).

[deleted]
Re:A few things iOS developers ought to know about the ARM a... by dfox on Monday July 19, 2010 @08:33AM (#1528408)
that is pretty common, for example Intel's (Marvell's now IIRC) PXA (i.e. Xscale) is not exactly SoC but still includes NOR flash die in same package.