# HG changeset patch # User sgehwolf # Date 1556638953 -7200 # Node ID 7cbcb271bad78b1acad78550b7450a312baafb36 # Parent 20dd618188ce5b54ff36b40bb39034967efa1a63 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization Summary: Compile with -O3 and relevant C flags as for fdlibm. Reviewed-by: andrew diff -r 20dd618188ce -r 7cbcb271bad7 make/bsd/makefiles/amd64.make --- a/make/bsd/makefiles/amd64.make Tue May 14 15:04:47 2019 +0100 +++ b/make/bsd/makefiles/amd64.make Tue Apr 30 17:42:33 2019 +0200 @@ -22,11 +22,16 @@ # # -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -# Must also specify if CPU is little endian +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif CFLAGS += -DVM_LITTLE_ENDIAN CFLAGS += -D_LP64=1 diff -r 20dd618188ce -r 7cbcb271bad7 make/bsd/makefiles/i486.make --- a/make/bsd/makefiles/i486.make Tue May 14 15:04:47 2019 +0100 +++ b/make/bsd/makefiles/i486.make Tue Apr 30 17:42:33 2019 +0200 @@ -24,10 +24,16 @@ # TLS helper, assembled from .s file -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Must also specify if CPU is little endian CFLAGS += -DVM_LITTLE_ENDIAN diff -r 20dd618188ce -r 7cbcb271bad7 make/bsd/makefiles/ppc.make --- a/make/bsd/makefiles/ppc.make Tue May 14 15:04:47 2019 +0100 +++ b/make/bsd/makefiles/ppc.make Tue Apr 30 17:42:33 2019 +0200 @@ -22,8 +22,16 @@ # # -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Must also specify if CPU is big endian CFLAGS += -DVM_BIG_ENDIAN diff -r 20dd618188ce -r 7cbcb271bad7 make/bsd/makefiles/zeroshark.make --- a/make/bsd/makefiles/zeroshark.make Tue May 14 15:04:47 2019 +0100 +++ b/make/bsd/makefiles/zeroshark.make Tue Apr 30 17:42:33 2019 +0200 @@ -25,10 +25,16 @@ # Setup common to Zero (non-Shark) and Shark versions of VM -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Specify that the CPU is little endian, if necessary ifeq ($(ZERO_ENDIANNESS), little) diff -r 20dd618188ce -r 7cbcb271bad7 make/linux/makefiles/amd64.make --- a/make/linux/makefiles/amd64.make Tue May 14 15:04:47 2019 +0100 +++ b/make/linux/makefiles/amd64.make Tue Apr 30 17:42:33 2019 +0200 @@ -22,10 +22,16 @@ # # -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Must also specify if CPU is little endian CFLAGS += -DVM_LITTLE_ENDIAN diff -r 20dd618188ce -r 7cbcb271bad7 make/linux/makefiles/i486.make --- a/make/linux/makefiles/i486.make Tue May 14 15:04:47 2019 +0100 +++ b/make/linux/makefiles/i486.make Tue Apr 30 17:42:33 2019 +0200 @@ -24,10 +24,16 @@ # TLS helper, assembled from .s file -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Must also specify if CPU is little endian CFLAGS += -DVM_LITTLE_ENDIAN diff -r 20dd618188ce -r 7cbcb271bad7 make/linux/makefiles/ppc64.make --- a/make/linux/makefiles/ppc64.make Tue May 14 15:04:47 2019 +0100 +++ b/make/linux/makefiles/ppc64.make Tue Apr 30 17:42:33 2019 +0200 @@ -49,3 +49,14 @@ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string endif + +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif diff -r 20dd618188ce -r 7cbcb271bad7 make/linux/makefiles/zeroshark.make --- a/make/linux/makefiles/zeroshark.make Tue May 14 15:04:47 2019 +0100 +++ b/make/linux/makefiles/zeroshark.make Tue Apr 30 17:42:33 2019 +0200 @@ -28,10 +28,16 @@ # override this from the main file because some version of llvm do not like -Wundef WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +# If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to +# the compiler so as to be able to produce optimized objects +# without losing precision. +ifneq ($(FDLIBM_CFLAGS),) + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(FDLIBM_CFLAGS) +else + OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) +endif # Specify that the CPU is little endian, if necessary ifeq ($(ZERO_ENDIANNESS), little)