can a gatekeeper help review this patch

This is a round off issue in IA64 system relative open64 library, the libffio.a.

we use opencc -O3 to build libffio.a, the round off option in -O3 is
-OPT:ro=2, it allow reassociation transforma\
tions.

in line 531 of file osprey/libu/numconv/mpp/defgu2s.c

expression
pre_result = a*x + (a*y + x*b +(b*y
           + (table_high*exact_low_number +
           exact_high_number*table_low +
           table_low*exact_low_number)));

the compiler will re-associated it to

pre_result = (a*x + a*y + x*b + b*y) +
           (table_high*exact_low_number +
           exact_high_number*table_low +
           table_low*exact_low_number);

so do the precision of pre_result, this difference may affect the
result of 200.sixtrack and them get outp\
ut difference error.

Here is my patch, I just add -OPT:ro=1 to make file defgu2s.c when
building library libffio.a

===================================================================
--- osprey/libu/Makefile.gbase  (revision 3495)
+++ osprey/libu/Makefile.gbase  (working copy)
@@ -358,3 +358,15 @@
        ./massage > numbers.h
 endif

+ifeq ($(BUILD_ARCH), IA64)
+ ifeq ($(BUILD_COMPILER), OSP)
+defgu2s.o : defgu2s.c
+       $(cc) -c $(CPPFLAGS) $(CFLAGS) -OPT:ro=1 $< -o $@
+
+defgu2s.pic.o : defgu2s.c
+       $(cc) $(pic_flag) -c $(CPPFLAGS) $(CFLAGS) -OPT:ro=1 $< -o $@
+
+defgu2s.pg.o : defgu2s.c
+       $(cc) $(prof_flag) -c $(CPPFLAGS) $(CFLAGS) -OPT:ro=1 $< -o $@
+ endif
+endif
\ No newline at end of file

-- 
yongchong

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to