Package: nodejs / 4.8.2~dfsg-1

2017_mips_configure_fpu.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Description: use configuration directive to set mips fpu mode
Author: YunQiang Su <wzssyqa@gmail.com>
Forwarded: https://github.com/paul99/v8m-rb/issues/192
Last-Update: 2015-09-29
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -137,22 +137,11 @@
 
 #if V8_HOST_ARCH_MIPS
 int __detect_fp64_mode(void) {
-  double result = 0;
-  // Bit representation of (double)1 is 0x3FF0000000000000.
-  __asm__ volatile(
-      ".set push\n\t"
-      ".set noreorder\n\t"
-      ".set oddspreg\n\t"
-      "lui $t0, 0x3FF0\n\t"
-      "ldc1 $f0, %0\n\t"
-      "mtc1 $t0, $f1\n\t"
-      "sdc1 $f0, %0\n\t"
-      ".set pop\n\t"
-      : "+m"(result)
-      :
-      : "t0", "$f0", "$f1", "memory");
-
-  return !(result == 1);
+#ifdef FPU_MODE_FP64
+  return 1;
+#else
+  return 0;
+#endif
 }