Commit 1212145b authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix ASSIGN_DBL on Win64

We were comparing ALIGNMENT_DOUBLE to ALIGNMENT_LONG, but really
we cared about W_ values, and sizeof(long) /= sizeof(void *) on Win64
parent 5784df0f
......@@ -257,7 +257,7 @@ typedef StgFunPtr F_;
INLINE_HEADER void ASSIGN_FLT (W_ [], StgFloat);
INLINE_HEADER StgFloat PK_FLT (W_ []);
#if ALIGNMENT_FLOAT <= ALIGNMENT_LONG
#if ALIGNMENT_FLOAT <= ALIGNMENT_VOID_P
INLINE_HEADER void ASSIGN_FLT(W_ p_dest[], StgFloat src) { *(StgFloat *)p_dest = src; }
INLINE_HEADER StgFloat PK_FLT (W_ p_src[]) { return *(StgFloat *)p_src; }
......@@ -278,9 +278,9 @@ INLINE_HEADER StgFloat PK_FLT(W_ p_src[])
return(y.f);
}
#endif /* ALIGNMENT_FLOAT > ALIGNMENT_LONG */
#endif /* ALIGNMENT_FLOAT > ALIGNMENT_VOID_P */
#if ALIGNMENT_DOUBLE <= ALIGNMENT_LONG
#if ALIGNMENT_DOUBLE <= ALIGNMENT_VOID_P
INLINE_HEADER void ASSIGN_DBL (W_ [], StgDouble);
INLINE_HEADER StgDouble PK_DBL (W_ []);
......@@ -288,7 +288,7 @@ INLINE_HEADER StgDouble PK_DBL (W_ []);
INLINE_HEADER void ASSIGN_DBL(W_ p_dest[], StgDouble src) { *(StgDouble *)p_dest = src; }
INLINE_HEADER StgDouble PK_DBL (W_ p_src[]) { return *(StgDouble *)p_src; }
#else /* ALIGNMENT_DOUBLE > ALIGNMENT_LONG */
#else /* ALIGNMENT_DOUBLE > ALIGNMENT_VOID_P */
/* Sparc uses two floating point registers to hold a double. We can
* write ASSIGN_DBL and PK_DBL by directly accessing the registers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment