硬件浮点参数设置问题
有谁知道编译gcc的时候,需要配置的arm11 cpu的参数是什么?
tune的参数有这些:
9694 `-mcpu=NAME'
9695 This specifies the name of the target ARM processor. GCC uses
9696 this name to determine what kind of instructions it can emit when
9697 generating assembly code. Permissible names are: `arm2', `arm250',
9698 `arm3', `arm6', `arm60', `arm600', `arm610', `arm620', `arm7',
9699 `arm7m', `arm7d', `arm7dm', `arm7di', `arm7dmi', `arm70', `arm700',
9700 `arm700i', `arm710', `arm710c', `arm7100', `arm720', `arm7500',
9701 `arm7500fe', `arm7tdmi', `arm7tdmi-s', `arm710t', `arm720t',
9702 `arm740t', `strongarm', `strongarm110', `strongarm1100',
9703 `strongarm1110', `arm8', `arm810', `arm9', `arm9e', `arm920',
9704 `arm920t', `arm922t', `arm946e-s', `arm966e-s', `arm968e-s',
9705 `arm926ej-s', `arm940t', `arm9tdmi', `arm10tdmi', `arm1020t',
9706 `arm1026ej-s', `arm10e', `arm1020e', `arm1022e', `arm1136j-s',
9707 `arm1136jf-s', `mpcore', `mpcorenovfp', `arm1156t2-s',
9708 `arm1156t2f-s', `arm1176jz-s', `arm1176jzf-s', `cortex-a5',
9709 `cortex-a8', `cortex-a9', `cortex-r4', `cortex-r4f', `cortex-m3',
9710 `cortex-m1', `cortex-m0', `xscale', `iwmmxt', `iwmmxt2', `ep9312'.
arch的参数:
9722 `-march=NAME'
9723 This specifies the name of the target ARM architecture. GCC uses
9724 this name to determine what kind of instructions it can emit when
9725 generating assembly code. This option can be used in conjunction
9726 with or instead of the `-mcpu=' option. Permissible names are:
9727 `armv2', `armv2a', `armv3', `armv3m', `armv4', `armv4t', `armv5',
9728 `armv5t', `armv5e', `armv5te', `armv6', `armv6j', `armv6t2',
9729 `armv6z', `armv6zk', `armv6-m', `armv7', `armv7-a', `armv7-r',
9730 `armv7-m', `iwmmxt', `iwmmxt2', `ep9312'.
vfp似乎也分很多类
9732 `-mfpu=NAME'
9733 `-mfpe=NUMBER'
9734 `-mfp=NUMBER'
9735 This specifies what floating point hardware (or hardware
9736 emulation) is available on the target. Permissible names are:
9737 `fpa', `fpe2', `fpe3', `maverick', `vfp', `vfpv3', `vfpv3-fp16',
9738 `vfpv3-d16', `vfpv3-d16-fp16', `vfpv3xd', `vfpv3xd-fp16', `neon',
9739 `neon-fp16', `vfpv4', `vfpv4-d16', `fpv4-sp-d16' and `neon-vfpv4'.
9740 `-mfp' and `-mfpe' are synonyms for `-mfpu'=`fpe'NUMBER, for
9741 compatibility with older versions of GCC.
我修改了lablin脚本中TARGET_SOC的参数如下:
BU_CPU_OPT="--with-float=hard"
GCC_CPU_OPT="--with-float=hard --with-arch=armv6 --with-tune=mpcore"
编译能通过,但是用qemu-arm运行helloworld也会报错:
$ sudo qemu-arm -L /home/baker/maxwit/rootfs/ a.out
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
本帖最后由 halechan 于 2011-03-15 15:58 编辑
--with-float=softfp
注:
soft、softfp、hard的区别:
"soft"
*
Full software floating point - compiler should refuse to generate a real FPU instruction and -mfpu= is ignored.
* FPU operations are emulated by the compiler
* Function calls are generated to pass FP arguments (float, double) in integer registers (one for float, a pair of registers for double)
"softfp"
*
Hardware floating point using the soft floating point ABI
* To reiterate, function calls are generated to pass FP arguments in integer registers
*
Compiler can make smart choices about when and if it generates emulated or real FPU instructions depending on chosen FPU type (-mfpu=)
*
This means soft and softfp code can be intermixed