ARMHF (hard-float ABI for ARM)

Publisher:哈哈哈33Latest update time:2016-07-25 Source: eefocusKeywords:ARMHF  hard-float  ABI  for  ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. What is armhf

      In Ubuntu 12.04 and Debian, in addition to arm and armel, there is also a version called armhf. What is this?

As we all know, armel is the main ARM ABI at present. armhf is a variant of armel, the main difference is in floating point calculation.

In Armel, there are three conventions for floating-point calculations.

Taking gcc as an example, there are three corresponding -mfloat-abi parameter values:

soft

      Soft means that all floating-point operations are implemented in the software layer, which is of course not very efficient and is suitable for early ARM processors that do not have floating-point calculation units;

softfp

      Softfp is currently the default setting for Armel. It delegates floating-point calculations to the FPU, but passes function parameters using general-purpose integer registers instead of FPU registers.

hard

      hard uses the FPU floating-point registers to pass function parameters to the FPU for processing.

It should be noted that in terms of compatibility, soft is compatible with the latter two, but softfp and hard modes are not compatible.

By default, armel uses softfp, so the hard mode armel is used as a separate abi, called armhf.


2. Value

     Using softfp mode, there will be unnecessary conversions from floating point to integer and from integer to floating point.

     Using hard mode can save an average of 20 CPU cycles for each floating-point related function call[1].

    For an architecture like ARM where every cycle counts, this improvement is undoubtedly huge. 

     Without changing the source code or configuration, using armhf can improve performance by 20-25% on some applications[2].

     For some programs that rely heavily on floating-point operations, the performance can be improved by 300%[3].


3. Use

      Enabling armhf requires hardware support. According to the Debian wiki, it requires an ARMv7 CPU, Thumb-2 instruction set, and VFP3D16 floating-point processor[4].

In the gcc compilation parameters, use -mfloat-abi=hard -mfpu=vfp.

In terms of tools, CodeSourcery first supported the hard mode. You can also compile the tool chain yourself [5].

 


4. History of Linux with armfp

      On May 20, 2010, Konstantinos Margaritis published a document announcing that Ubuntu Larmic would be ported to hard mode[6].

      This news later sparked a discussion on powerdeveloper about performance improvements[7].

On July 6, 2010, Hector Oron sent the email discussion between him and Konstantinos to the debian-arm mailing list [8].

It was called armelfp, which attracted the attention of the community and got the official name armhf.

On July 18, 2010, the unofficial debian-armhf port work started[9].

On November 24, 2011, the port became an official Debian activity.

Currently, more than 90% of the software in the Debian repository has been ported[10].

Debian plans to release an armhf version in Wheezy (7.0), and Ubuntu also plans to release an armhf version in Precise Pangolin 12.04 LTS.

In addition, for the Toshiba AC100 mentioned earlier, armhf debian and ubuntu images are now available for installation and trial [11, 12].

Keywords:ARMHF  hard-float  ABI  for  ARM Reference address:ARMHF (hard-float ABI for ARM)

Previous article:ARM MP-core boot process
Next article:Some suggestions for beginners on whether to choose to learn ARM7 or ARM9

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号