diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-28 01:06:27 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-28 01:06:27 +0200 |
commit | 3a00ba63aa6d52092ff0674e97147e70da9c45c2 (patch) | |
tree | 0a5c6227112f52c309c42209273427093904ee6b | |
parent | 66f04e038e510e27037c0c8a6673c5940c8b22f1 (diff) |
x86/string: explain the memory clobber in read-only functions
-rw-r--r-- | arch/x86/machine/string.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/machine/string.c b/arch/x86/machine/string.c index e4f7f0c9..c44b62d5 100644 --- a/arch/x86/machine/string.c +++ b/arch/x86/machine/string.c @@ -13,6 +13,11 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * + * Despite comparison and scan instructions not having side-effects, the + * memory clobber is used because the compiler cannot infer dependencies + * on the memory referenced by the pointers. */ #include <stddef.h> |