Remove a strict aliasing issue with pre-computed curve448 constants
[openssl.git] / crypto / ec / curve448 / arch_32 / f_impl.h
index 7c87e97..217f994 100644 (file)
@@ -9,12 +9,16 @@
  *
  * Originally written by Mike Hamburg
  */
-#define GF_HEADROOM 2
-#define LIMB(x) (x)&((1<<28)-1), (x)>>28
-#define FIELD_LITERAL(a,b,c,d,e,f,g,h) \
+
+#ifndef HEADER_ARCH_32_F_IMPL_H
+# define HEADER_ARCH_32_F_IMPL_H
+
+# define GF_HEADROOM 2
+# define LIMB(x) (x)&((1<<28)-1), (x)>>28
+# define FIELD_LITERAL(a,b,c,d,e,f,g,h) \
     {{LIMB(a),LIMB(b),LIMB(c),LIMB(d),LIMB(e),LIMB(f),LIMB(g),LIMB(h)}}
 
-#define LIMB_PLACE_VALUE(i) 28
+# define LIMB_PLACE_VALUE(i) 28
 
 void gf_add_RAW(gf out, const gf a, const gf b)
 {
@@ -54,3 +58,5 @@ void gf_weak_reduce(gf a)
         a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 28);
     a->limb[0] = (a->limb[0] & mask) + tmp;
 }
+
+#endif                  /* HEADER_ARCH_32_F_IMPL_H */