summaryrefslogtreecommitdiff
blob: fd6bfa17109adf51e090276a5d6bcda3f3cef32d (plain)
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
35
36
37
38
39
diff -ru math.orig/nistp224-0.75/src/opt-idea64.c math/nistp224-0.75/src/opt-idea64.c
--- math.orig/nistp224-0.75/src/opt-idea64.c	2001-10-19 06:39:19.000000000 +1000
+++ math/nistp224-0.75/src/opt-idea64.c	2007-01-30 11:30:08.000000000 +1100
@@ -2,7 +2,8 @@
 
 static void fpmode(void)
 {
-  asm volatile("fldcw %0"::"m"(0x137f));
+  static short int x=0x137f;
+  asm volatile("fldcw %0"::"m"(*&x));
 }
 
 #define T0 1.0
diff -ru math.orig/nistp224-0.75/src/opt-pentium.c math/nistp224-0.75/src/opt-pentium.c
--- math.orig/nistp224-0.75/src/opt-pentium.c	2001-10-19 06:39:19.000000000 +1000
+++ math/nistp224-0.75/src/opt-pentium.c	2007-01-30 11:30:44.000000000 +1100
@@ -129,7 +129,8 @@
 
 static inline void fpmode(void)
 {
-  asm volatile("fldcw %0"::"m"(0x137f));
+  static short int x=0x137f;
+  asm volatile("fldcw %0"::"m"(*&x));
 }
 
 static void p_sqrt(double out[8],const double in[8])
diff -ru math.orig/nistp224-0.75/src/opt-ppro.c math/nistp224-0.75/src/opt-ppro.c
--- math.orig/nistp224-0.75/src/opt-ppro.c	2001-10-19 06:39:19.000000000 +1000
+++ math/nistp224-0.75/src/opt-ppro.c	2007-01-30 11:30:27.000000000 +1100
@@ -120,7 +120,8 @@
 
 static inline void fpmode(void)
 {
-  asm volatile("fldcw %0"::"m"(0x137f));
+  static short int x=0x137f;
+  asm volatile("fldcw %0"::"m"(*&x));
 }
 
 static void p_sqrt(double out[8],const double in[8])