1156cd587Sjoerg//===-- extendsfdf2vfp.S - Implement extendsfdf2vfp -----------------------===// 2156cd587Sjoerg// 3156cd587Sjoerg// The LLVM Compiler Infrastructure 4156cd587Sjoerg// 5156cd587Sjoerg// This file is dual licensed under the MIT and the University of Illinois Open 6156cd587Sjoerg// Source Licenses. See LICENSE.TXT for details. 7156cd587Sjoerg// 8156cd587Sjoerg//===----------------------------------------------------------------------===// 9156cd587Sjoerg 10156cd587Sjoerg#include "../assembly.h" 11156cd587Sjoerg 12156cd587Sjoerg// 13156cd587Sjoerg// extern double __extendsfdf2vfp(float a); 14156cd587Sjoerg// 15156cd587Sjoerg// Converts single precision float to double precision result. 16156cd587Sjoerg// Uses Darwin calling convention where a single precision parameter is 17156cd587Sjoerg// passed in a GPR and a double precision result is returned in R0/R1 pair. 18156cd587Sjoerg// 19156cd587Sjoerg .syntax unified 20*61f2f256Sjoerg .p2align 2 21156cd587SjoergDEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp) 22156cd587Sjoerg vmov s15, r0 // load float register from R0 23156cd587Sjoerg vcvt.f64.f32 d7, s15 // convert single to double 24156cd587Sjoerg vmov r0, r1, d7 // return result in r0/r1 pair 25156cd587Sjoerg bx lr 26156cd587SjoergEND_COMPILERRT_FUNCTION(__extendsfdf2vfp) 27