views:

882

answers:

5

Hi Does iphone processor ARMV6 supports MMX instructions?

A: 

Possibly helpful link: ARM Processor Instruction Set Architecture.

Looks like ARMV6 has a SIMD unit of some kind...

dmckee
+2  A: 

MMX is a SIMD instruction set for x86. The iPhone uses an ARM processor so you can't use MMX.

Zifre
Intel's ARM processors support MMX. More precisely: they support a technology named MMX: Intel added SIMD instructions to their ARM processors and called them "MMX" even though they have nothing to do with x86 MMX and are in no way compatible. (Just like they implemented SMT in the Pentium4 and CMT in the Itanium and called them both HyperThreading, even though SMT and CMT are two entirely different things.)
Jörg W Mittag
Intel don't make ARM processors. They made StrongARM processors.
Roger Nolan
A: 

ARMs are a bit configurable, so, it's possible that the ARM in the iPhone doesn't have this. Somebody who's actually signed up for the program might be able to answer, if the NDA allows.

If you have something that MUST work, you could, I guess, build bochs. My guess is that you want to use mmx instructions for speed, and, obviously, this won't help a whole lot. If you have some algorithm that could run slowly, but, you can't reverse engineer it to run without mmx instructions bochs might solve the problem.

Bruce ONeel
+2  A: 

The short answer is no - MMX is an intel technology. The longer answer is that ARM Supports the Neon SIMD instruction set. It is a similar architecture to the MMX instruction (i.e. it computes vecors) but it is obvioulsy not the same. ARM ship libraries to help you generate SIMD code (Using OpenMAX and GCC compiler intrinsics).

The iPhone includes a ARMv6KZ which does not support NEON later models include a Samsung S5PC100 which is based on the ARM Cortex-A8 core and does support Neon. Similarly, the Apple A4 powering the iPad is a Cortex-A8 based SoC.

Roger Nolan
And of course, time marches on, and now the iPhone 3Gs and the non-8GB iPod Touch third generation have Neon (and likely the iPad does, too).
Pierre Lebeaupin
thanks. Updated main comment to reflect this.
Roger Nolan
A: 

As others have posted here, MMX is the Intel SIMD technology for the x86 architecture. So no, the iPhone does not support MMX itself.

The iPhone features an ARM Coretex A8 CPU, specifically the Samsung SoC S5PC100 that provides a SIMD extension known as NEON (the ARM equivalent to MMX).

While this isn't explicitly documented by Apple yet, the toolchain seems to support it. There are instrinsics for NEON in gcc, so you should be able to write SIMD code using NEON.

Note that this feature is specific to the 3GS, so is not backward compatible. You would need to ensure your app was flagged to indicate it required the 3GS (I don't think you can access the status registers for runtime detection).

gavinb