gcc - VFP using ARM inline assembly -
i trying write simple function use vfp on beagleboard. however, iḿ getting following error : expected ´)´ before ´:´ token. here code:
float floatmod(float a, float b) { float result;         __asm__volatile__(         "vmov.f32 s7, %p[a]"         "vmov.f32 s8, %p[b]"         "vdiv.f32 s9, s7, s8"         "vmls.f32 s7, s8, s9"         :s7 "=t" (c)         :[a] "t" (a), [b] "t" (b)         :"s7", "s8", "s9"         );               return c;   }
iḿ new inline assembly might have made mistakes
you should end each line either semicolon ; or newline symbol \n:
__asm__ __volatile__(     "vmov.f32 s7, %p[a];"     "vmov.f32 s8, %p[b];"     "vdiv.f32 s9, s7, s8;"     "vmls.f32 s7, s8, s9;"     :s7 "=t" (c)     :[a] "t" (a), [b] "t" (b)     :"s7", "s8", "s9" );   btw, beagleboard supports neon, , neon much faster vfp on cortex-a8 (the cpu core inside beagleboard)
Comments
Post a Comment