summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/nistp224/files/nistp224-0.75-asmfix.patch')
-rw-r--r--app-crypt/nistp224/files/nistp224-0.75-asmfix.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch b/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch
new file mode 100644
index 000000000000..fd6bfa17109a
--- /dev/null
+++ b/app-crypt/nistp224/files/nistp224-0.75-asmfix.patch
@@ -0,0 +1,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])