AnsweredAssumed Answered

fract32 builtins in blackfin

Question asked by dspgeek on Oct 1, 2009
Latest reply on Oct 7, 2009 by StuartS

Hi ,

 

I am using blackfin 537 builtins for 1.31 math operations. Can you tell me where can i find the source code for them? i had a look at the disassembly of the builtins code and it seems much more than required.

 

Can you tell me what is the extra code for? I have pasted the code below for addition of fract 32 variable. The multiplication code looks even horrible.

 

 

/**************************/
/*                        */
/*   fract32 arithmetic   */
/*                        */
/**************************/

 

/* Performs 32-bit addition of the two input parameters (_x+_y). */
#pragma always_inline
static __inline fract32 add_fr1x32(fract32 _x, fract32 _y)
  { return __builtin_add_fr1x32(_x,_y); }
[FFA0479A] R0 = R7 + R6 ( S ) ;
[FFA0479E] [ FP + -224 ] = R0 ;
[FFA0482E] R7 = R0 + R1 ( S ) ;
[FFA04832] [ FP + -212 ] = R7 ;
[FFA04C8C] R2 = R3 + R5 ( S ) ;
[FFA04C90] [ FP + -120 ] = R2 ;
[FFA04E78] R6 = R4 + R7 ( S ) ;
[FFA04E7C] [ FP + -52 ] = R6 ;
[FFA04F46] R3 = R7 + R1 ( S ) ;
[FFA04F4A] [ FP + -20 ] = R3 ;

Outcomes