Altera_Forum
Honored Contributor
15 years agoCustom Instructions: Single-precision -mcustom-* compiler options
Hi,
we have a couple of custom instructions (CI) for single precision floating point computing. Including <, >, <= ,int2float, float2int and all that. You can tell the compiler to use the CI instead of using the software implementation by setting some compiler options. For example the int to float typecast --- Quote Start --- -mcustom-floatis=N (with N the number of the CI) --- Quote End --- So all software calls to a typecast inside the code are replaced with the CI. This works pretty fine for the typecast int2float and float2int. But when it comes to floating point comparison, it does not work. I want the compiler to insert CI-call for floating point comparison:
if (float1 < float2)
{
.....
}
Therefore I use following compiler option (with 4 is the CI-number for lower comparison): --- Quote Start --- -mcustom-fcmplts=4 --- Quote End --- But when I take a look at the *.objdump it still calls the software implementation. does anybody know what i am doing wrong? Thanks for your efforts, Philipp