1214152Sed//===-- fixunsdfsivfp.S - Implement fixunsdfsivfp -------------------------===//
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 unsigned int __fixunsdfsivfp(double a);
14214152Sed//
15214152Sed// Converts double precision float to a 32-bit unsigned int rounding towards
16214152Sed// zero. All negative values become zero.
17214152Sed// Uses Darwin calling convention where a double precision parameter is
18214152Sed// passed in GPR register pair.
19214152Sed//
20236011Smarius	.syntax unified
21214152Sed	.align 2
22214152SedDEFINE_COMPILERRT_FUNCTION(__fixunsdfsivfp)
23236011Smarius	vmov	d7, r0, r1    // load double register from R0/R1
24236011Smarius	vcvt.u32.f64 s15, d7  // convert double to 32-bit int into s15
25236011Smarius	vmov	r0, s15	      // move s15 to result register
26214152Sed	bx	lr
27