3 ms·
While some of NaCl's kernels are written using qhasm, qhasm itself is not part of the build process of NaCl. This means that those functions cannot be ran on, s
by pbsd 10y ago
While some of NaCl's kernels are written using qhasm, qhasm itself is not part of the build process of NaCl. This means that those functions cannot be ran on, say, Windows, because the calling convention (and the assembly syntax) is different. qhasm also does not have programming capabilities, so one would need a lot of code duplication to write an SSE2, SSSE3, AVX2, etc variant of the same function. While OpenSSL's perlasm is an abomination, it does produce "portable" assembly output, and there is no obvious superior option to accomplish that. This is something sorely missing from our collective toolchains.
- btrask 10y agoIt sounds like this perlasm is the state of the art in maximally efficient high level languages. (Half joking.) I feel like if you took something like qhasm and extended it to be a full language rather than sort of a hack, you would end up with something really beautiful, like Forth minus the crazy and plus both standard assembly and high level syntax. It could be a better C than C.
- astrange 10y agoThe nasm/yasm macro packages in x264 source can do all this for you and more, across i386/x86-64 sysv/win64. The Win64 versions are a little less optimal IIRC, but to be fair Win64 is dumb.