armv6,armv7 ,armv7s 的整理笔记

来源:互联网 发布:淘宝上买iphone7 编辑:程序博客网 时间:2024/05/17 07:50


armv 是指令集的意思,偏硬件。目前iphone5支持armv7s。


The iPhone 5 will ship with and only run iOS 6.0. To coincide with the launch of iOS 6.0, Apple has seeded developers with a newer version of its development tools. Xcode 4.5 makes two major changes: it drops support for the ARMv6 ISA (used by the ARM11 core in the iPhone 2G and iPhone 3G), keeps support for ARMv7 (used by modern ARM cores) and it adds support for a new architecture target designed to support the new A6 SoC: armv7s.


Iphone5使用了armv7s芯片,他是armv7的超集,只是更新了浮点运算单元,增加了一些指令,而通常在ios6之前编译的通用库文件是包涵,armv6和armv7的fat包,是没有armv7s的库文件的。而大多数情况下,我们又没有库文件的源文件,因此想要编译一个支持armv7s的版本也是无法实现了,一个简易的实现方式就是删除支持armv7s的配置。

还有一种方式,就是拷贝一份armv7的库文件将其复制标记成为armv7s的库文件。不过这个库文件里包涵的.o文件就是实现函数方法的对象集合。在.o文件里有一个头来表明这个包是为哪个系列的cpu制作的,在该头里(Mach-O header,有一个用于描述cpu的类型和子类型的字段。ARM类型是12,armv7子类型是9,armv7s子类型是11,所以我们只需要将标记为9的子类型改为11即可,说起来容易,不过实现起来还是很烦的。


1.OpenGL ES版本支持


iPhone:iPhone 3G以下(包括iPhone 3G)版本设备只支持OpenGL ES1.1,iPhone 3GS以上(包括iPhone 3GS)版本设备既支持OpenGL ES1.1,也支持OpenGL ES2.0。

iPad:iPad所有版本设备既支持OpenGL ES1.1,也支持OpenGL ES2.0。

iPod Touch:iPod Touch2代以下(包括iPod Touch2代)版本设备只支持OpenGL ES1.1,iPod Touch3代以上(包括iPod Touch3代)版本设备既支持OpenGL ES1.1,也支持OpenGL ES2.0,但8GB版的iPod Touch3代不支持OpenGL ES2.0。


2.armv6和armv7,armv7s


armv6:iPhone 2G/3G,iPod 1G/2G

armv7:iPhone 3GS/4/4s,iPod 3G/4G,iPad 1G/2G/3G

armv7s:iPhone5



参考:http://stackoverflow.com/questions/12569339/what-is-armv7s; http://www.augcg.com/ios/armv7sconvert





原创粉丝点击