summaryrefslogtreecommitdiff
path: root/arch/x86/machine/string.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-28 01:06:27 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-28 01:06:27 +0200
commitb8542a013fd35334b80a4d8cf7e4b5e3483ffb9b (patch)
tree0a5c6227112f52c309c42209273427093904ee6b /arch/x86/machine/string.c
parent8a19eb4f93075e024ac1a804744c22c305d4247d (diff)
x86/string: explain the memory clobber in read-only functions
Diffstat (limited to 'arch/x86/machine/string.c')
-rw-r--r--arch/x86/machine/string.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/machine/string.c b/arch/x86/machine/string.c
index e4f7f0c..c44b62d 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>