commit | 1c919724d3f887b184f5194a8709c8ae652e4b7f | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Wed Jan 27 16:35:25 2021 -0500 |
committer | Adam Langley <agl@google.com> | Wed Jan 27 22:51:57 2021 +0000 |
tree | 70f215849733bcfc8028cfc6306a824939e2400f | |
parent | 5cf02188feba518aecfda7a05c72b1586c5c4080 [diff] |
Support MOVLPS and MOVHPS in delocate. GCC 10.2.1 seems to be emitting code like this: movq gcm_gmult_clmul@GOTPCREL(%rip), %xmm0 movhps gcm_ghash_clmul@GOTPCREL(%rip), %xmm0 movaps %xmm0, (%rsp) This is assembling a pair of function pointers in %xmm0 and writing the two out together. I've not observed the compiler output movlps, but supporting movhps and movlps are about as tricky. The main complication is that these instructions preserve the unwritten half of the destination, and they do not support register sources, only memory. This CL supports them by loading in a general-purpose register as we usually do, pushing the register on the stack, and then running the instruction on (%rsp). Some alternatives I considered: - Save/restore a temporary XMM register and then use MOVHLPS and MOVLHPS. This would work but require another saveRegister-like wrapper. - Take advantage of loadFromGOT ending in a memory mov and swap out the final instruction. This would be more efficient, but we downgrade GOT-based accesses to local symbols to a plain LEA. The compiler will only do this when we write a pair of function pointers in a row, so trying to optimize the non-local symbols seems not worth the trouble. (Really the compiler should not be emitting GOT-relative loads at all, but the compiler doesn't know these symbols will be private and in the same module, so it has a habit of pessimally using GOT-based loads.) This option seemed the simplest. Change-Id: I8c4915a6a0d72aa4c5f4d581081b99b3a6ab64c2 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45244 Reviewed-by: Adam Langley <agl@google.com>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
There are other files in this directory which might be helpful: