Author: dgilmore
Date: 2012-08-21 01:49:00 -0400 (Tue, 21 Aug 2012)
New Revision: 4016

Modified:
   trunk/osprey/linux/make/gcommondefs
Log:
X8664 -m32 FP compilation mode change when compiling with GCC.

When compiling with GCC at 32, add -mfpmath=sse -msse2, which
prevents i387 FP instructions from being generated, otherwise the
values for probabilities and frequencies can easily diverge between
the 32 and 64 bit builds of the compiler.

CR: Sun Chan


Modified: trunk/osprey/linux/make/gcommondefs
===================================================================
--- trunk/osprey/linux/make/gcommondefs 2012-08-21 05:47:27 UTC (rev 4015)
+++ trunk/osprey/linux/make/gcommondefs 2012-08-21 05:49:00 UTC (rev 4016)
@@ -1,7 +1,7 @@
 # -*- Makefile -*-
 #
 #
-#  Copyright (C) 2009 Advanced Micro Devices, Inc.  All Rights Reserved.
+#  Copyright (C) 2009, 2012 Advanced Micro Devices, Inc.  All Rights Reserved.
 #
 #  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
 #
@@ -200,6 +200,15 @@
   CCNAME  += -m32
   C++NAME += -m32
   F90 += -m32
+  ifeq ($(BUILD_COMPILER), GNU)
+    # Adding -mfpmath=sse -msse, to prevent compiler built
+    # 32 or 64 bit from producing different code in GRA.
+    # Note that -ffloat-store should be just as effective
+    # but -mfpmath=sse -msse produces better code.
+    CCNAME  += -mfpmath=sse -msse2
+    C++NAME += -mfpmath=sse -msse2
+    F90 += -mfpmath=sse -msse2
+  endif
 endif
 
 ifeq ($(BUILD_ARCH), X8664)


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to