1214152Sed//===-- floatunssidfvfp.S - Implement floatunssidfvfp ---------------------===//
2214152Sed//
3214152Sed//                     The LLVM Compiler Infrastructure
4214152Sed//
5222656Sed// This file is dual licensed under the MIT and the University of Illinois Open
6222656Sed// Source Licenses. See LICENSE.TXT for details.
7214152Sed//
8214152Sed//===----------------------------------------------------------------------===//
9214152Sed
10214152Sed#include "../assembly.h"
11214152Sed
12214152Sed//
13214152Sed// extern double __floatunssidfvfp(unsigned int a);
14214152Sed//
15214152Sed// Converts a 32-bit int to a double precision float.
16214152Sed// Uses Darwin calling convention where a double precision result is
17214152Sed// return in GPR register pair.
18214152Sed//
19229135Sed	.syntax unified
20214152Sed	.align 2
21214152SedDEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp)
22229135Sed	vmov	s15, r0        // move int to float register s15
23229135Sed	vcvt.f64.u32 d7, s15   // convert 32-bit int in s15 to double in d7
24229135Sed	vmov	r0, r1, d7     // move d7 to result register pair r0/r1
25214152Sed	bx	lr
26