Home | History | Annotate | Line # | Download | only in arm
      1      1.1  joerg //===-- extendsfdf2vfp.S - Implement extendsfdf2vfp -----------------------===//
      2      1.1  joerg //
      3      1.1  joerg //                     The LLVM Compiler Infrastructure
      4      1.1  joerg //
      5      1.1  joerg // This file is dual licensed under the MIT and the University of Illinois Open
      6      1.1  joerg // Source Licenses. See LICENSE.TXT for details.
      7      1.1  joerg //
      8      1.1  joerg //===----------------------------------------------------------------------===//
      9      1.1  joerg 
     10      1.1  joerg #include "../assembly.h"
     11      1.1  joerg 
     12      1.1  joerg //
     13      1.1  joerg // extern double __extendsfdf2vfp(float a);
     14      1.1  joerg //
     15      1.1  joerg // Converts single precision float to double precision result.
     16      1.1  joerg // Uses Darwin calling convention where a single precision parameter is
     17      1.1  joerg // passed in a GPR and a double precision result is returned in R0/R1 pair.
     18      1.1  joerg //
     19      1.1  joerg 	.syntax unified
     20  1.1.1.2  joerg 	.p2align 2
     21      1.1  joerg DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp)
     22      1.1  joerg 	vmov	s15, r0      // load float register from R0
     23      1.1  joerg 	vcvt.f64.f32 d7, s15 // convert single to double
     24      1.1  joerg 	vmov	r0, r1, d7   // return result in r0/r1 pair
     25      1.1  joerg 	bx	lr
     26      1.1  joerg END_COMPILERRT_FUNCTION(__extendsfdf2vfp)
     27