aboutsummaryrefslogtreecommitdiff
path: root/crypto/perlasm
AgeCommit message (Collapse)AuthorFilesLines
2016-10-10Remove trailing whitespace from some files.David Benjamin5-21/+21
The prevailing style seems to not have trailing whitespace, but a few lines do. This is mostly in the perlasm files, but a few C files got them after the reformat. This is the result of: find . -name '*.pl' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.c' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.h' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' Then bn_prime.h was excluded since this is a generated file. Note mkerr.pl has some changes in a heredoc for some help output, but other lines there lack trailing whitespace too. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-29perlasm/ppc-xlate.pl: recognize .type directive.Andy Polyakov1-19/+53
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-16Fix compilation when using MASM on x86Gergely Nagy1-1/+1
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 Polyakov1-2/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-01SPARC assembly pack: enforce V8+ ABI constraints.Andy Polyakov1-0/+4
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 Polyakov1-7/+8
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-20Make arm-xlate.pl set use strict.David Benjamin1-1/+3
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 Polyakov2-0/+9
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 Polyakov1-1/+7
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14perlasm/x86_64-xlate.pl: refactor argument parsing loop.Andy Polyakov1-11/+12
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-14Make x86_64-xlate.pl 'use strict' clean.David Benjamin1-114/+119
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 Salz1-0/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Copyright consolidation: perl filesRich Salz9-13/+70
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 Polyakov1-2/+5
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-13PPC assebmly pack: initial POWER9 support tidbits.Andy Polyakov1-0/+15
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08SPARCv9 assembly pack: unify build rules and argument handling.Andy Polyakov1-0/+4
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 Polyakov1-1/+1
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 Dukhovni1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Perl's chop / chomp considered bad, use a regexp insteadRichard Levitte1-2/+2
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 Polyakov1-2/+5
RT#3885 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10x86[_64] assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY1-2/+2
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 Polyakov1-0/+6
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 Polyakov1-0/+20
RT#4162 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-20Add assembly support for 32-bit iOS.Andy Polyakov1-1/+1
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 Polyakov1-24/+49
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-02-24Fix crash in SPARC T4 XTS.Andy Polyakov1-0/+1
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-02-22perlasm/x86masm.pl: make it work.Andy Polyakov1-6/+6
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 Polyakov1-0/+140
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 Polyakov1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-08-09Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz1-1/+1
Undo unapproved commit that removed DJGPP and WATT32
2014-08-08Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz1-1/+1
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 Polyakov1-6/+14
2014-07-01perlasm/ppc-xlate.pl update.Andy Polyakov1-0/+3
2014-05-12Add "teaser" AES module for PowerISA 2.07.Andy Polyakov1-0/+33
"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 Polyakov1-0/+6
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 Polyakov1-0/+2
2014-02-27perlasm/x86gas.pl: limit special OPENSSL_ia32cap_P treatment to ELF.Andy Polyakov1-3/+3
2014-02-14x86[_64]cpuid.pl: add low-level RDSEED.Andy Polyakov2-0/+21
2013-12-18PPC assembly pack: improve AIX support (enable vpaes-ppc).Andy Polyakov1-1/+1
2013-12-09x86_64-xlate.pl: minor update.Andy Polyakov1-0/+1
2013-12-04perlasm/ppc-xlate.pl: add support for AltiVec/VMX and VSX.Andy Polyakov1-1/+5
Suggested by: Marcello Cerri
2013-12-04perlasm/ppc-xlate.pl: improve linux64le support.Andy Polyakov1-5/+11
Suggested by: Marcello Cerri
2013-10-31perlas/ppc-xlate.pl: fix typo.Andy Polyakov1-1/+1
2013-10-31perlasm/ppc-xlate.pl: add .quad directiveAndy Polyakov1-0/+19
sha/asm/sha512-ppc.pl: add little-endian support. Submitted by: Marcelo Cerri
2013-10-15PPC assembly pack: add .size directives.Andy Polyakov1-3/+5
2013-10-03perlasm/sparcv9_modes.pl: make it work even with seasoned perl.Andy Polyakov1-2/+2
PR: 3130
2013-10-03x86_64-xlate.pl: fix jrcxz in nasm case.Andy Polyakov1-3/+3
2013-09-05misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos3-3/+3
2013-06-30x86_64-xlate.pl: Windows fixes.Andy Polyakov1-3/+5