Commit fb4c212b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Reduce register clobber

parent f755d520
...@@ -79,30 +79,30 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter, ...@@ -79,30 +79,30 @@ static void Do_F32_S32 (aout_instance_t *aout, aout_filter_t *filter,
if (nb_samples & 2) if (nb_samples & 2)
asm volatile ( asm volatile (
"vld1.f32 {d0}, [%[inp]]!\n" "vld1.f32 {d0}, [%[inp]]!\n"
"vcvt.s32.f32 d1, d0, #28\n" "vcvt.s32.f32 d0, d0, #28\n"
"vst1.s32 {d1}, [%[outp]]!\n" "vst1.s32 {d0}, [%[outp]]!\n"
: [outp] "+r" (outp), [inp] "+r" (inp) : [outp] "+r" (outp), [inp] "+r" (inp)
: :
: "q0", "memory"); : "d0", "memory");
if (nb_samples & 4) if (nb_samples & 4)
asm volatile ( asm volatile (
"vld2.f32 {q0}, [%[inp]]!\n" "vld2.f32 {q0}, [%[inp]]!\n"
"vcvt.s32.f32 q1, q0, #28\n" "vcvt.s32.f32 q0, q0, #28\n"
"vst2.s32 {q1}, [%[outp]]!\n" "vst2.s32 {q0}, [%[outp]]!\n"
: [outp] "+r" (outp), [inp] "+r" (inp) : [outp] "+r" (outp), [inp] "+r" (inp)
: :
: "q0", "q1", "memory"); : "q0", "memory");
while (inp != endp) while (inp != endp)
asm volatile ( asm volatile (
"vld4.f32 {q0-q1}, [%[inp]]!\n" "vld4.f32 {q0-q1}, [%[inp]]!\n"
"vcvt.s32.f32 q2, q0, #28\n" "vcvt.s32.f32 q0, q0, #28\n"
"vcvt.s32.f32 q3, q1, #28\n" "vcvt.s32.f32 q1, q1, #28\n"
"vst4.s32 {q2-q3}, [%[outp]]!\n" "vst4.s32 {q0-q1}, [%[outp]]!\n"
: [outp] "+r" (outp), [inp] "+r" (inp) : [outp] "+r" (outp), [inp] "+r" (inp)
: :
: "q0", "q1", "q2", "q3", "memory"); : "q0", "q1", "memory");
outbuf->i_nb_samples = inbuf->i_nb_samples; outbuf->i_nb_samples = inbuf->i_nb_samples;
outbuf->i_nb_bytes = inbuf->i_nb_bytes; outbuf->i_nb_bytes = inbuf->i_nb_bytes;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment