зеркало из https://github.com/mozilla/gecko-dev.git
Incorporate multiplication performance enhancements for UltraSparc CPUs
with the VIS instructions.
This commit is contained in:
Родитель
c206d3e3c8
Коммит
e118ef4f63
|
@ -119,8 +119,15 @@ ifeq ($(OS_RELEASE),5.8)
|
|||
endif
|
||||
ifeq ($(SYSV_SPARC),1)
|
||||
ifdef USE_64
|
||||
DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD -DMP_ASSEMBLY_MULTIPLY
|
||||
MPI_SRCS += mpi_sparc.c mpv_sparc.c
|
||||
SOLARIS_FLAGS = -fast -xO5 -xrestrict=%all -xdepend -xchip=ultra -xarch=v9a -KPIC -mt
|
||||
else
|
||||
DEFINES += -DMP_NO_MP_WORD
|
||||
DEFINES += -DMP_NO_MP_WORD -DMP_ASSEMBLY_MULTIPLY
|
||||
ASFILES = mpv_sparc32.S
|
||||
ASM_SUFFIX = .S
|
||||
MPI_SRCS += mpi_sparc.c
|
||||
SOLARIS_FLAGS = -xchip=ultra -xarch=v8plusa -KPIC -mt
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -151,8 +158,7 @@ private_export::
|
|||
ifeq ($(OS_ARCH), WINNT)
|
||||
rm -f $(DIST)/lib/bsafe$(BSAFEVER).lib
|
||||
endif
|
||||
$(NSINSTALL) -R $(BSAFEPATH) $(DIST)/lib;
|
||||
|
||||
$(NSINSTALL) -R $(BSAFEPATH) $(DIST)/lib
|
||||
endif
|
||||
|
||||
mp%.h : mpi/mp%.h
|
||||
|
@ -161,6 +167,9 @@ mp%.h : mpi/mp%.h
|
|||
mp%.c : mpi/mp%.c
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
mp%.S : mpi/mp%.S
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
mp%.s : mpi/mp%.s
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
|
@ -173,15 +182,39 @@ logtab.h : mpi/logtab.h
|
|||
primes.c : mpi/primes.c
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
vis%.il : mpi/vis%.il
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
vis%.h : mpi/vis%.h
|
||||
cd mpi; cp $@ ..
|
||||
|
||||
.PRECIOUS : $(MPI_SRCS) $(MPI_HDRS) $(ASFILES)
|
||||
|
||||
ALL_TRASH += $(MPI_SRCS) $(MPI_HDRS) $(ASFILES) primes.c
|
||||
|
||||
DEFINES += -DMP_API_COMPATIBLE
|
||||
|
||||
MPI_USERS = dh.c pqg.c dsa.c rsa.c
|
||||
|
||||
MPI_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_SRCS:.c=$(OBJ_SUFFIX)))
|
||||
#MPI_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(DH_SRCS:.c=$(OBJ_SUFFIX)))
|
||||
MPI_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(MPI_USERS:.c=$(OBJ_SUFFIX)))
|
||||
|
||||
$(MPI_OBJS): $(MPI_HDRS) primes.c
|
||||
|
||||
ifeq ($(SYSV_SPARC),1)
|
||||
SPARCFIX = $(OBJDIR)/sparcfix
|
||||
|
||||
$(SPARCFIX): sparcfix.c
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ -O sparcfix.c -l elf
|
||||
|
||||
$(OBJDIR)/mpv_sparc32.o: $(SPARCFIX) mpv_sparc32.S
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(SOLARIS_FLAGS) -c mpv_sparc32.S
|
||||
$(SPARCFIX) $@
|
||||
|
||||
$(OBJDIR)/mpv_sparc.o: vis_64.il vis_proto.h mpv_sparc.c
|
||||
@$(MAKE_OBJDIR)
|
||||
$(CC) -o $@ $(SOLARIS_FLAGS) -c vis_64.il mpv_sparc.c
|
||||
# $(SPARCFIX) $@
|
||||
endif
|
||||
|
|
|
@ -70,11 +70,11 @@ CSRCS = \
|
|||
arcfour.c \
|
||||
desblapi.c \
|
||||
des.c \
|
||||
$(MPI_SRCS) \
|
||||
dh.c \
|
||||
pqg.c \
|
||||
dsa.c \
|
||||
rsa.c \
|
||||
$(MPI_SRCS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
## GPL.
|
||||
##
|
||||
##
|
||||
## $Id: Makefile,v 1.10 2000/09/19 02:24:31 wtc%netscape.com Exp $
|
||||
## $Id: Makefile,v 1.11 2000/09/30 01:46:30 nelsonb%netscape.com Exp $
|
||||
##
|
||||
|
||||
## Define CC to be the C compiler you wish to use. The GNU cc
|
||||
|
@ -84,15 +84,26 @@ CFLAGS= -O $(MPICMN)
|
|||
#CFLAGS= -O -Olimit 4000 -ieee_with_inexact -std1 -DOSF1 -D_REENTRANT \
|
||||
-DMP_NO_MP_WORD $(MPICMN)
|
||||
|
||||
#Solaris
|
||||
#Solaris 64
|
||||
#SOLARIS_ASM_FLAGS = -fast -xO5 -xrestrict=%all -xdepend -xchip=ultra -xarch=v9a -KPIC -mt
|
||||
#AS_OBJS = mpi_sparc.o mpv_sparc.o
|
||||
#MPICMN += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD -DMP_ASSEMBLY_MULTIPLY
|
||||
#CFLAGS= -O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
|
||||
-DSOLARIS2_8 -D_SVID_GETTOD -xarch=v9 -DXP_UNIX -DNSS_USE_64 $(MPICMN)
|
||||
#CFLAGS= -g -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
|
||||
-DSOLARIS2_8 -D_SVID_GETTOD -xarch=v9 -DXP_UNIX -DNSS_USE_64 $(MPICMN)
|
||||
|
||||
#Solaris 32
|
||||
#CFLAGS=-O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
|
||||
-DSOLARIS2_6 -D_SVID_GETTOD -xarch=v8 -DXP_UNIX -DMP_NO_MP_WORD $(MPICMN)
|
||||
#CFLAGS=-O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
|
||||
-DSOLARIS2_6 -D_SVID_GETTOD -xarch=v8 -DXP_UNIX $(MPICMN)
|
||||
#SOLARIS_ASM_FLAGS = -xchip=ultra -xarch=v8plusa -KPIC -mt
|
||||
#AS_OBJS = mpi_sparc.o mpv_sparc32.o
|
||||
#MPICMN += -DMP_ASSEMBLY_MULTIPLY
|
||||
#CFLAGS=-O -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT \
|
||||
-DSOLARIS2_6 -D_SVID_GETTOD -xarch=v8 -DXP_UNIX -DMP_NO_MP_WORD \
|
||||
-DMP_ASSEMBLY_MULTIPLY $(MPICMN)
|
||||
|
||||
#HPUX
|
||||
#CFLAGS= -O -DHPUX10 -D_POSIX_C_SOURCE=199506L -Ae +Z -DHPUX -Dhppa \
|
||||
|
@ -210,6 +221,12 @@ mpprime.o: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
|
|||
mpi_mips.o: mpi_mips.s
|
||||
$(CC) -o $@ $(ASFLAGS) -c mpi_mips.s
|
||||
|
||||
mpv_sparc32.o: mpv_sparc32.S
|
||||
$(CC) -o $@ $(SOLARIS_ASM_FLAGS) -c mpv_sparc32.S
|
||||
|
||||
mpv_sparc.o: vis_64.il mpv_sparc.c
|
||||
$(CC) -o $@ $(SOLARIS_ASM_FLAGS) -c vis_64.il mpv_sparc.c
|
||||
|
||||
libmpi.a: $(LIBOBJS)
|
||||
ar -cvr libmpi.a $(LIBOBJS)
|
||||
$(RANLIB) libmpi.a
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* may use your version of this file under either the MPL or the
|
||||
* GPL.
|
||||
*
|
||||
* $Id: mpi.h,v 1.13 2000/09/29 19:51:32 nelsonb%netscape.com Exp $
|
||||
* $Id: mpi.h,v 1.14 2000/09/30 01:46:30 nelsonb%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#ifndef _H_MPI_
|
||||
|
@ -101,13 +101,14 @@ typedef unsigned int mp_digit;
|
|||
#define MP_ULONG_LONG_MAX ULONG_LONG_MAX
|
||||
#elif defined(ULLONG_MAX) /* Solaris */
|
||||
#define MP_ULONG_LONG_MAX ULLONG_MAX
|
||||
/* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */
|
||||
#elif defined(ULONGLONG_MAX) /* IRIX, AIX */
|
||||
#define MP_ULONG_LONG_MAX ULONGLONG_MAX
|
||||
#endif
|
||||
|
||||
#if defined(MP_ULONG_LONG_MAX)
|
||||
#if MP_ULONG_LONG_MAX > UINT_MAX
|
||||
#if MP_ULONG_LONG_MAX == ULONG_MAX
|
||||
#if (MP_ULONG_LONG_MAX > UINT_MAX) || defined(SOLARIS)
|
||||
#if MP_ULONG_LONG_MAX == ULONG_MAX || (defined(SOLARIS) && defined(NSS_USE_64))
|
||||
typedef unsigned long mp_word;
|
||||
typedef long mp_sword;
|
||||
#define MP_WORD_MAX ULONG_MAX
|
||||
|
@ -116,10 +117,12 @@ typedef unsigned long long mp_word;
|
|||
typedef long long mp_sword;
|
||||
#define MP_WORD_MAX MP_ULONG_LONG_MAX
|
||||
#endif
|
||||
#else /* MP_ULONG_LONG_MAX <= UINT_MAX */
|
||||
#else
|
||||
/* MP_ULONG_LONG_MAX <= UINT_MAX */
|
||||
#define MP_NO_MP_WORD 1
|
||||
#endif
|
||||
#else /* MP_ULONG_LONG_MAX not defined */
|
||||
#else
|
||||
/* MP_ULONG_LONG_MAX not defined */
|
||||
#define MP_NO_MP_WORD 1
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче