Why not runtime instead of compile time?

 

From: Bill Fischofer [mailto:bill.fischofer@linaro.org]
Sent: Tuesday, November 17, 2015 2:14 PM
To: Pinski, Andrew <Andrew.Pinski@caviumnetworks.com>
Cc: Linaro Toolchain Mailman List <linaro-toolchain@lists.linaro.org>; Barry Spinney <spinney@ezchip.com>
Subject: Re: Configuration question

 

Thanks, however we were hoping that this is something that might be determined at configure/compile time via standard configuration options (we use autotools).  

 

On Tue, Nov 17, 2015 at 4:10 PM, Pinski, Andrew <Andrew.Pinski@caviumnetworks.com> wrote:

Sounds like HWCAP should be checked at runtime for these features and then have a fallback to software one.

This might mean using function pointers and initializing the correct ones.  Or better yet use ifunc directly to check on them.

 

Thanks,

Andrew

 

From: linaro-toolchain [mailto:linaro-toolchain-bounces@lists.linaro.org] On Behalf Of Bill Fischofer
Sent: Tuesday, November 17, 2015 2:08 PM
To: Linaro Toolchain Mailman List <linaro-toolchain@lists.linaro.org>
Cc: Barry Spinney <spinney@ezchip.com>
Subject: Configuration question

 

Hi,

 

This question has arisen in the ODP project and the thought is that a 'best practices' answer would be more likely to be found on this list.  

 

We have a component that wants to make use of specialized instructions for performing CRC and/or AES computations and was wondering what is the recommended way for an application to determine whether such instructions are available in the toolchain and whether the user has overruled their use?

 

Thanks for any insight you can provide.

 

Bill