AnsweredAssumed Answered

sqrt function with hard FPU instrustion

Question asked by Bipin Panchal on Jan 15, 2015
Latest reply on Mar 15, 2015 by Bipin Panchal

Dear Sir

K60 microcontroller has inbuit FPU, So it support floating point instuction by hard ware itself rather than softcode

I am using KDS for K60  and i using sqrtf() function in .list file it shows software root function. as below

 

 

****b_out = sqrtf(a);
  82              .loc 1 82 0 discriminator 1
  83 0036 40F20003movwr3, #:lower16:a
  84 003a C0F20003movtr3, #:upper16:a
  85 003e D3ED007Afldss15, [r3]
  86 0042 B0EE670Afcpyss0, s15
  87 0046 FFF7FEFFblsqrtf
  88 004a F0EE407Afcpyss15, s0
  89 004e 40F20003movwr3, #:lower16:b_out
  90 0052 C0F20003movtr3, #:upper16:b_out
  91 0056 C3ED007Afstss15, [r3]
  83:../Sources/main.c ****timecount = timecount+1.2;

 

1.can somebody say how to invoke floting instuction ?

2. is possible to do square root by excecuting sqrt hardware instruction? if yes then how.

Outcomes