Inline Assembler: which constraint for double parameters?
Hi,
I want to use a double precision input parameter for an inline assembler function, for example
int32_t Double2Long(double a) {
int32_t c;
asm (
" vcvtr.s32.f64 s0,%[in] \n\t"
" vmov %[out],s0 \n\t"
: [out] "=r" (c) /* output */
: [in] "w" (a) /* Input */
: "s0" /* clobber */
);
return c;
}
Contraint "w" does not work, the assembler uses s14 instead of a double precision register (Error: invalid instruction shape -- `vcvtr.s32.f64 s0,s14'). "d" as constraint is not accepted, so I checked all letters from a to z and A to Z. Nothing works, the assembler either uses rn or sn or [sp] or says "impossible constraint" . Does anyone know how to do it?
Best regards
Hartmut
