diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-02-24 23:48:37 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-02-24 23:48:37 +0000 |
commit | 9f2bc17e912ec718e7fec2e31df95c986f073d9c (patch) | |
tree | f4ba6b93e24544ec762b72e0645fcc48d43c14d5 /sdk/recipes/patches/openssl/m68k-atari-mint | |
parent | 042d9f4c0d1dd37d1cfc24413e7c8211f86fe0c8 (diff) | |
parent | 1ab0f15987f1fe6687eb7e03a521ec5cffae5a48 (diff) | |
download | toolchains-9f2bc17e912ec718e7fec2e31df95c986f073d9c.tar.gz toolchains-9f2bc17e912ec718e7fec2e31df95c986f073d9c.tar.bz2 |
Merge branch 'chris/openssl-68k'
Incorporate m68k optimisations for OpenSSL.
Amiga and Atari m68k builds both confirmed to still be functional with these changes.
Diffstat (limited to 'sdk/recipes/patches/openssl/m68k-atari-mint')
-rw-r--r-- | sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p | 12 | ||||
-rw-r--r-- | sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p | 25 |
2 files changed, 37 insertions, 0 deletions
diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p new file mode 100644 index 0000000..8d3bfc6 --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.Makefile.p @@ -0,0 +1,12 @@ +--- crypto/bn/Makefile 2017-01-26 13:22:03.000000000 +0000 ++++ crypto/bn/Makefile 2017-02-11 15:24:31.133017711 +0000 +@@ -60,6 +60,9 @@ lib: $(LIBOBJ) + $(RANLIB) $(LIB) || echo Never mind. + @touch lib + ++bn_m68k.o: asm/bn_m68k.s ++ $(CC) $(CFLAGS) -c -o $@ asm/bn_m68k.s ++ + bn-586.s: asm/bn-586.pl ../perlasm/x86asm.pl + $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + co-586.s: asm/co-586.pl ../perlasm/x86asm.pl diff --git a/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p new file mode 100644 index 0000000..0d5492f --- /dev/null +++ b/sdk/recipes/patches/openssl/m68k-atari-mint/crypto.bn.bn_div.c.p @@ -0,0 +1,25 @@ +--- crypto/bn/bn_div.c 2017-01-26 13:22:03.000000000 +0000 ++++ crypto/bn/bn_div.c 2017-02-11 16:06:29.437010335 +0000 +@@ -175,6 +175,22 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, cons + q; \ + }) + # define REMAINDER_IS_ALREADY_CALCULATED ++# elif defined(__mc68020__) ++ /* Same rationale as for i386. On the 68020-60/CPU32 the divu ++ * instruction will take a 64 bit dividend in a register pair ++ * and overwrite that pair with the remainder:quotient. ++ * Howard Chu ++ */ ++# undef bn_div_words ++# define bn_div_words(n0,n1,d0) \ ++ ({ asm volatile ( \ ++ "divu.l %4,%2:%3" \ ++ : "=d"(rem), "=d"(q) \ ++ : "0"(n0), "1"(n1), "d"(d0) \ ++ : "cc"); \ ++ q; \ ++ }) ++# define REMAINDER_IS_ALREADY_CALCULATED + # endif /* __<cpu> */ + # endif /* __GNUC__ */ + # endif /* OPENSSL_NO_ASM */ |