blob: 381e590c342fbf9f2bda92b7e5055a7a7d03c5c4 [file] [log] [blame]
Pirama Arumuga Nainara4cf3ee2015-05-20 13:03:23 -07001//===-- lib/truncsfhf2.c - single -> half conversion --------------*- C -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#define SRC_SINGLE
11#define DST_HALF
12#include "fp_trunc_impl.inc"
13
Pirama Arumuga Nainarcdce50b2015-07-01 12:26:56 -070014// Use a forwarding definition and noinline to implement a poor man's alias,
15// as there isn't a good cross-platform way of defining one.
16COMPILER_RT_ABI __attribute__((noinline)) uint16_t __truncsfhf2(float a) {
Pirama Arumuga Nainara4cf3ee2015-05-20 13:03:23 -070017 return __truncXfYf2__(a);
18}
19
20COMPILER_RT_ABI uint16_t __gnu_f2h_ieee(float a) {
Pirama Arumuga Nainarcdce50b2015-07-01 12:26:56 -070021 return __truncsfhf2(a);
Pirama Arumuga Nainara4cf3ee2015-05-20 13:03:23 -070022}