diff options
Diffstat (limited to 'compiler-rt/lib/builtins/truncsfhf2.c')
| -rw-r--r-- | compiler-rt/lib/builtins/truncsfhf2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/builtins/truncsfhf2.c b/compiler-rt/lib/builtins/truncsfhf2.c index a25dd83d868..381e590c342 100644 --- a/compiler-rt/lib/builtins/truncsfhf2.c +++ b/compiler-rt/lib/builtins/truncsfhf2.c @@ -11,10 +11,12 @@ #define DST_HALF #include "fp_trunc_impl.inc" -COMPILER_RT_ABI uint16_t __truncsfhf2(float a) { +// Use a forwarding definition and noinline to implement a poor man's alias, +// as there isn't a good cross-platform way of defining one. +COMPILER_RT_ABI __attribute__((noinline)) uint16_t __truncsfhf2(float a) { return __truncXfYf2__(a); } COMPILER_RT_ABI uint16_t __gnu_f2h_ieee(float a) { - return __truncXfYf2__(a); + return __truncsfhf2(a); } |

