Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/40255: devel/liboil tries to use ARM FP instructions?



Ah yes, sorry, missed the list out of the reply.
The last paragraph is probably the best solution.

   M

On 12/23/08, Ignatios Souvatzis <is%netbsd.org@localhost> wrote:
> Any idea what's wrong with the cited PR? Should I disable vfp somehow?
>  math_vfp_asm.S:107: Error: selected processor does not support `fldmias 
> r1!,{s0}'
>  math_vfp_asm.S:107: Error: selected processor does not support `fldmias 
> r2!,{s1}'
>  math_vfp_asm.S:107: Error: selected processor does not support `fadds 
> s2,s0,s1'
>  math_vfp_asm.S:107: Error: selected processor does not support `fstmias 
> r0!,{s2}

Assuming this thing checks for runtime presence of VFP before using
this code, a frequent trick is to use the alternative assembler syntax
for coprocessor instructions, to make sure it will assemble even when
the selected coprocessor isn't chosen as the compile-time target:

Example (for maverick crunch FPU):
      /* Use the generic coprocessor form so that gas doesn't complain
         on soft-float targets.  */
      ldcl  p4, cr0, [r0], #8 /* cfldrd mv0, [r0], #8 */
...
      stcl  p4, cr0, [r0], #8 /* cfstrd mv0, [r0], #8 */

I dunno how you find out the generic equivalents for VFP instructions...
you can probably figure it out from the ARM Architecture Manual
ddi0100e_arm_arm.pdf
and there is a quick list of coprocessor insns at the end of the quick
reference card QRC0001H_rvct_v2.1_arm.pdf

Alternatively,
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
(also in asm) is the right compile-time test for VFP hardfloat, since
__VFP_FP__ indicates use of the VFP floating point format also when
softfloat is in force.

   M


Home | Main Index | Thread Index | Old Index