ADS 나 RVDS 의 컴파일러에서는 -fpu 옵션을 사용 할 수 있다.
옵션의 각 내용은 다음과 같다. none Selects no floating-point option. No floating-point code is to be used. vfp Selects hardware vector floating-point unit conforming to architecture VFPv1. This is a synonym for -fpu vfpv1. This option is not available for the Thumb compilers. vfpv1 Selects hardware vector floating-point unit conforming to architecture VFPv1, such as the VFP10 rev 0. This option is not available for the Thumb compilers. vfpv2 Selects hardware vector floating-point unit conforming to architecture VFPv2, such as the VFP10 rev 1. This option is not available for the Thumb compilers. fpa Selects hardware Floating Point Accelerator (FPA). This option is not available for the Thumb compilers and is only provided for backwards compatibility. softvfp+vfp Selects a floating-point library with pure-endian doubles and software floating-point linkage that uses the VFP hardware. Select this option if you are interworking Thumb code with ARM code on a system that implements a VFP unit. If you select this option: - tcc and tcpp behave exactly as for -fpu softvfp except that they link with VFP-optimized floating-point libraries. - armcc and armcpp behave the same as for -fpu vfp except that all functions are given software floating-point linkage. This means that ARM functions compiled with this option pass and return floating-point arguments and results as they would for -fpu softvfp, but use VFP instructions internally. * Note If you specify this option for both armcc and tcc, it ensures that your interworking floating-point code is compiled to use software floating-point linkage. If you specify vfp, vfpv1, or vfpv2 for armcc you must use the __softfp keyword to ensure that your interworking ARM code is compiled to use software floating-point linkage. See the description of __softfp in Function keywords for more information. softvfp Selects software floating-point library (FPLib) with pure-endian doubles. This is the default if you do not specify a -fpu option. softfpa Selects software floating-point library with mixed-endian doubles. -- DynaText 4.1 에서 발췌. 위의 옵션을 적용하는데 앞서 확인해야 할 사항은 VFP 를 가진 CPU는 ARM10 과 ARM11 코어 이며, 이외에는 거의가 내장되어 있지 않다. FPA : ARM7500FE VFPv1 : ARM10200(VFP10 revision 0 silicon) VFPv2 : ARM10200E(VFP10 revision 1), ARM1136JF-S(VFP11), VFP9-S 또한 -cpu 옵션에 의해 명시되는 경우 -fpu 옵션은 쓰지 않아도 상관이 없다. 그리고 이러한 경우에 -fpu 를 명시해 주면 -cpu 의 아키텍쳐에 오버라이드 된다. 하지만, -cpu 로 명시된 FPU 아키텍처에 -fpu fpa 처럼 옵션을 주면 에러가 발생된다. 서로 호환성이 없기 때문이다. 대부분의 ARM9 프로세서는 VFP 를 가지고 있지 않다. 따라서 이런경우에는 -fpu softvfp 를 사용하면 vfp 에물레이션으로 동작하게 된다. 단, 속도는 역시 매우 느리다. ADS1.2 을 사용하는 경우 반드시 패치를 해줄것. http://www.arm.com/support/downloads/info/2319.html 위의 링크에서 VFP Support code 를 받을 수 있다. ARM920T 코어를 사용하는 Cirrus 의 EP9315 에는 FPU가 내장되어 있다. 하지만, ARM 컴퍼일러에서는 활성화 시킬 방법을 찾지 못했다. GCC는 Crunch-GCC를 이용하면 된다. 다만 리눅스가 아니면 디버깅할 방법이 없다. -_-; |


