File: ftbfs-i386.patch

package info (click to toggle)
fp16 0.0~git20200514.4dfe081-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 828 kB
  • sloc: cpp: 6,690; ansic: 675; python: 140; makefile: 11
file content (17 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: fp16: libfp16 fails to build for i386
URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996702
Author: Alexander Inyukhin <shurick@sectorb.msk.ru>
Index: fp16/include/fp16/fp16.h
===================================================================
--- fp16.orig/include/fp16/fp16.h
+++ fp16/include/fp16/fp16.h
@@ -228,7 +228,8 @@ static inline uint16_t fp16_ieee_from_fp
 	const float scale_to_inf = fp32_from_bits(UINT32_C(0x77800000));
 	const float scale_to_zero = fp32_from_bits(UINT32_C(0x08800000));
 #endif
-	float base = (fabsf(f) * scale_to_inf) * scale_to_zero;
+   const volatile float base_inf = fabsf(f) * scale_to_inf;
+	float base = base_inf * scale_to_zero;
 
 	const uint32_t w = fp32_to_bits(f);
 	const uint32_t shl1_w = w + w;