--- pgp/src/platform.h 2018/04/24 16:38:53 1.1.1.1 +++ pgp/src/platform.h 2018/04/24 16:43:51 1.1.1.6 @@ -35,7 +35,7 @@ * atomic multiply instruction. For a 16x16 bit multiply yielding a * 32-bit product, MUNIT16 should be set. * Define one (or more) of the following: - * PEASANT, MERRITT, UPTON, SMITH -algorithm used for modmult. All defined + * PEASANT, MERRITT, UPTON, SMITH -algorithm used for modmult.All defined * algorithms are compiled, but the first defined name listed will be * assigned to the generic entry point symbols. Multiple algorithms are * used primarily for testing. @@ -78,6 +78,7 @@ #ifndef PORTABLE #ifdef MSDOS +#ifndef i386 /* gcc */ #define UNIT16 #define MUNIT16 #define mp_setp P_SETP @@ -89,6 +90,7 @@ #define mp_set_recip P_SETRECIP #define SMITH #define PLATFORM_SPECIFIED +#endif /* i386 */ #endif /* MSDOS */ #ifdef VMS @@ -112,8 +114,10 @@ * instructions. */ #pragma builtins -#define mp_move( dst, src) _MOVC3( global_precision*4, (char *) src, (char *) dst) -#define unitfill0( r, unitcount) _MOVC5( 0, (char *) 0, 0, unitcount*4, (char *) r) +#define mp_move( dst, src) _MOVC3( global_precision*4, (char *) src, \ +(char *) dst) +#define unitfill0( r, unitcount) _MOVC5( 0, (char *) 0, 0, unitcount*4, \ +(char *) r) #define mp_burn(r) _MOVC5(0, (char *) 0, 0, global_precision*4, (char *) r) #define mp_init0(r) mp_burn(r) /* Just for documentation purposes */ #endif /* VAXC */ @@ -121,7 +125,7 @@ #define PLATFORM_SPECIFIED #endif /* VMS */ -#ifdef mips +#if defined(mips) || defined(__mips) /* * Needs r3kd.s and r3000.s (or r3000.c) */ @@ -171,6 +175,28 @@ #define PLATFORM_SPECIFIED #endif /* sparc */ +#if defined(mc68000) || defined(mc68020) +/* + * Needs mc68020.S + */ +#define UNIT32 +#define mp_setp P_SETP +#define mp_addc P_ADDC +#define mp_subb P_SUBB +#define mp_rotate_left P_ROTL +#define unitfill0(r,ct) memset((void*)r, 0, (ct)*sizeof(unit)) +#if defined(sun3) || defined(mc68020) +# define UPTON +# define MUNIT32 +# define mp_smul P_SMUL +/* # define mp_dmul P_DMUL */ /* mc68020.s has a bug in P_DMUL */ +#else +# define SMITH +# define MUNIT16 +#endif +#define PLATFORM_SPECIFIED +#endif /* mc68000 */ + /* Add additional platforms here ... */ /**************** End of system specification ************************/