summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
AgeCommit message (Collapse)Author
2017-05-05perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.Andy Polyakov
Perl, multiple versions, for some reason occasionally takes issue with letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as 0xb1 came out wrong when generating code for MASM. Fixes GH#3241. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3385) (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)
2017-02-14Fix a few typosFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2571) (cherry picked from commit 7e12cdb52e3f4beff050caeecf3634870bb9a7c4)
2016-12-12perlasm/x86_64-xlate.pl: refine sign extension in ea package.Andy Polyakov
$1<<32>>32 worked fine with either 32- or 64-bit perl for a good while, relying on quirk that [pure] 32-bit perl performed it as $1<<0>>0. But this apparently changed in some version past minimally required 5.10, and operation result became 0. Yet, it went unnoticed for another while, because most perl package providers configure their packages with -Duse64bitint option. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 82e089308bd9a7794a45f0fa3973d7659420fbd8)
2016-08-16Fix compilation when using MASM on x86Gergely Nagy
The generated asm code from x86cpuid.pl contains CMOVE instructions which are only available on i686 and later CPUs. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1459)
2016-07-15crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-01SPARC assembly pack: enforce V8+ ABI constraints.Andy Polyakov
Even though it's hard to imagine, it turned out that upper half of arguments passed to V8+ subroutine can be non-zero. ["n" pseudo-instructions, such as srln being srl in 32-bit case and srlx in 64-bit one, were implemented in binutils 2.10. It's assumed that Solaris assembler implemented it around same time, i.e. 2000.] Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-24perlasm/x86_64-xlate.pl: address errors and warnings in elderly perls.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-20Make arm-xlate.pl set use strict.David Benjamin
It was already nearly clean. Just one undeclared variable. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1240)
2016-06-14perlasm/x86*.pl: add endbranch instruction.Andy Polyakov
For further information see "Control-flow Enforcement Technology Preview" by Intel. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14perlasm/x86_64-xlate.pl: add commentary.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14perlasm/x86_64-xlate.pl: refactor argument parsing loop.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14Make x86_64-xlate.pl 'use strict' clean.David Benjamin
use strict would have caught a number of historical bugs in the perlasm code, some in the repository and some found during review. It even found a fresh masm-only bug (see below). This required some tweaks. The "single instance is enough" globals got switched to proper blessed objects rather than relying on symbolic refs. A few types need $opcode passed in as a result. The $$line thing is a little bit of a nuisance. There may be a clearer pattern to use instead. This even a bug in the masm code. 9b634c9b37afc482a8dc8868e367bdd1b650e507 added logic to make labels global or function-global based on whether something starts with a $, seemingly intended to capture the $decor setting of '$L$'. However, it references $ret which is not defined in label::out. label::out is always called after label::re, so $ret was always the label itself, so the line always ran. I've removed the regular expression so as not to change the behavior of the script. A number of the assembly files now routinely jump across functions, so this seems to be the desired behavior now. GH#1165 Signed-off-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-01Remove/rename some old files.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Copyright consolidation: perl filesRich Salz
Add copyright to most .pl files This does NOT cover any .pl file that has other copyright in it. Most of those are Andy's but some are public domain. Fix typo's in some existing files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20perlasm/x86_64-xlate.pl: make latest ml64 work.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13PPC assebmly pack: initial POWER9 support tidbits.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08SPARCv9 assembly pack: unify build rules and argument handling.Andy Polyakov
Make all scripts produce .S, make interpretation of $(CFLAGS) pre-processor's responsibility, start accepting $(PERLASM_SCHEME). [$(PERLASM_SCHEME) is redundant in this case, because there are no deviataions between Solaris and Linux assemblers. This is purely to unify .pl->.S handling across all targets.] Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07perlasm/x86_64-xlate.pl: handle binary constants early.Andy Polyakov
Not all assemblers of "gas" flavour handle binary constants, e.g. seasoned MacOS Xcode doesn't, so give them a hand. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-13Fix some issues near recent chomp changes.Viktor Dukhovni
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Perl's chop / chomp considered bad, use a regexp insteadRichard Levitte
Once upon a time, there was chop, which somply chopped off the last character of $_ or a given variable, and it was used to take off the EOL character (\n) of strings. ... but then, you had to check for the presence of such character. So came chomp, the better chop which checks for \n before chopping it off. And this worked well, as long as Perl made internally sure that all EOLs were converted to \n. These days, though, there seems to be a mixture of perls, so lines from files in the "wrong" environment might have \r\n as EOL, or just \r (Mac OS, unless I'm misinformed). So it's time we went for the more generic variant and use s|\R$||, the better chomp which recognises all kinds of known EOLs and chops them off. A few chops were left alone, as they are use as surgical tools to remove one last slash or one last comma. NOTE: \R came with perl 5.10.0. It means that from now on, our scripts will fail with any older version. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11perlasm/x86_64-xlate.pl: pass pure constants verbatim.Andy Polyakov
RT#3885 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10x86[_64] assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-07ARMv4 assembly pack: allow Thumb2 even in iOS build,Andy Polyakov
and engage it in most modules. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-03perlasm/ppc-xlate.pl: comply with ABIs that specify vrsave as reserved.Andy Polyakov
RT#4162 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-20Add assembly support for 32-bit iOS.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-02perlasm/arm-xlate.pl update (fix end-less loop and prepare for 32-bit iOS).Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-02-24Fix crash in SPARC T4 XTS.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-02-22perlasm/x86masm.pl: make it work.Andy Polyakov
Though this doesn't mean that masm becomes supported, the script is still provided on don't-ask-in-case-of-doubt-use-nasm basis. See RT#3650 for background. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-23Add assembly support to ios64-cross.Andy Polyakov
Fix typos in ios64-cross config line. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-09-12perlasm/x86_64-xlate.pl: handle inter-bank movd.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-08-09Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz
Undo unapproved commit that removed DJGPP and WATT32
2014-08-08Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz
DJGPP is no longer a supported platform. Remove all #ifdef, etc., cases that refer to it. DJGPP also #define'd WATT32, so that is now removed as well.
2014-07-09x86_64 assembly pack: improve masm support.Andy Polyakov
2014-07-01perlasm/ppc-xlate.pl update.Andy Polyakov
2014-05-12Add "teaser" AES module for PowerISA 2.07.Andy Polyakov
"Teaser" means that it's not integrated yet and purpose of this commit is primarily informational, to exhibit design choices, such as how to handle alignment and endianness. In other words it's proof-of-concept code that EVP module will build upon.
2014-03-07SPARC T4 assembly pack: treat zero input length in CBC.Andy Polyakov
The problem is that OpenSSH calls EVP_Cipher, which is not as protective as EVP_CipherUpdate. Formally speaking we ought to do more checks in *_cipher methods, including rejecting lengths not divisible by block size (unless ciphertext stealing is in place). But for now I implement check for zero length in low-level based on precedent. PR: 3087, 2775
2014-02-27perlasm/x86asm.pl: recognize elf-1 denoting old ELF platforms.Andy Polyakov
2014-02-27perlasm/x86gas.pl: limit special OPENSSL_ia32cap_P treatment to ELF.Andy Polyakov
2014-02-14x86[_64]cpuid.pl: add low-level RDSEED.Andy Polyakov
2013-12-18PPC assembly pack: improve AIX support (enable vpaes-ppc).Andy Polyakov
2013-12-09x86_64-xlate.pl: minor update.Andy Polyakov
2013-12-04perlasm/ppc-xlate.pl: add support for AltiVec/VMX and VSX.Andy Polyakov
Suggested by: Marcello Cerri
2013-12-04perlasm/ppc-xlate.pl: improve linux64le support.Andy Polyakov
Suggested by: Marcello Cerri
2013-10-31perlas/ppc-xlate.pl: fix typo.Andy Polyakov
2013-10-31perlasm/ppc-xlate.pl: add .quad directiveAndy Polyakov
sha/asm/sha512-ppc.pl: add little-endian support. Submitted by: Marcelo Cerri
2013-10-15PPC assembly pack: add .size directives.Andy Polyakov
2013-10-03perlasm/sparcv9_modes.pl: make it work even with seasoned perl.Andy Polyakov
PR: 3130
2013-10-03x86_64-xlate.pl: fix jrcxz in nasm case.Andy Polyakov
2013-09-05misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos