]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[skein] Fix compilation on gnu assembler with gcc-6 and gcc-9
authorAdrian Chadd <adrian@FreeBSD.org>
Wed, 14 Oct 2020 14:29:56 +0000 (14:29 +0000)
committerAdrian Chadd <adrian@FreeBSD.org>
Wed, 14 Oct 2020 14:29:56 +0000 (14:29 +0000)
commitcffe0e0f9d594fe6dfd1d8ad5dec72242e2305a6
tree791d1933ab9a5d987ffc13cb30e1970980941003
parentf5cafae199500b3aad9ad81dc2dc6e9d97bd87df
[skein] Fix compilation on gnu assembler with gcc-6 and gcc-9

For some reason I don't want to really understand, the following
happens with gnu as.

/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S: Assembler messages:
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:466: Error: found '(', expected: ')'
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:466: Error: junk at end of line, first unrecognized character is `('
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:795: Error: found '(', expected: ')'
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:795: Error: junk at end of line, first unrecognized character is `('
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement
/home/adrian/git/freebsd/src/sys/crypto/skein/amd64/skein_block_asm.S:885: Error: non-constant expression in ".if" statement

After an exhaustive search and experimentation at 11pm, I discovered that
putting them in parentheses fixes the compilation.

Ed pointed out that I could likely fix this in a bunch of other
locations but I'd rather leave these alone until other options
are enabled.

Tested:

* gcc-6, amd64

Reviewed by: emaste
sys/crypto/skein/amd64/skein_block_asm.S