aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-01-29 15:09:14 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-06-26 15:52:36 +0000
commit38dc5ed3cee4b2aec04becba9042a0272609325d (patch)
treefb05464c8d0b990ce27db6ec12b20d69f31ff12a
parentf2ef124469aef4ba17fb201d5412b04cc298bd2a (diff)
downloadsrc-38dc5ed3cee4b2aec04becba9042a0272609325d.tar.gz
src-38dc5ed3cee4b2aec04becba9042a0272609325d.zip
amd64: add missing ALIGN_TEXT to loops in memset and memmove
(cherry picked from commit 164c3b81848bc81dc200b12370999474225447a3)
-rw-r--r--lib/libc/amd64/string/memmove.S2
-rw-r--r--lib/libc/amd64/string/memset.S1
-rw-r--r--sys/amd64/amd64/support.S3
3 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/amd64/string/memmove.S b/lib/libc/amd64/string/memmove.S
index accc86440610..4797140a1c16 100644
--- a/lib/libc/amd64/string/memmove.S
+++ b/lib/libc/amd64/string/memmove.S
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
cmpq $256,%rcx
ja 1256f
+ ALIGN_TEXT
103200:
movq (%rsi),%rdx
movq %rdx,(%rdi)
@@ -198,6 +199,7 @@ __FBSDID("$FreeBSD$");
cmpq $32,%rcx
jb 2016f
+ ALIGN_TEXT
2032:
movq (%rsi),%rdx
movq %rdx,(%rdi)
diff --git a/lib/libc/amd64/string/memset.S b/lib/libc/amd64/string/memset.S
index 67f21714b3d1..0639573a4a3e 100644
--- a/lib/libc/amd64/string/memset.S
+++ b/lib/libc/amd64/string/memset.S
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
cmpq $256,%rcx
ja 1256f
+ ALIGN_TEXT
103200:
movq %r10,(%rdi)
movq %r10,8(%rdi)
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 906e52b81db7..6fd123e94377 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -322,6 +322,7 @@ END(memcmp)
cmpq $256,%rcx
ja 1256f
+ ALIGN_TEXT
103200:
movq (%rsi),%rdx
movq %rdx,(%rdi)
@@ -455,6 +456,7 @@ END(memcmp)
cmpq $32,%rcx
jb 2016f
+ ALIGN_TEXT
2032:
movq (%rsi),%rdx
movq %rdx,(%rdi)
@@ -595,6 +597,7 @@ END(memcpy_erms)
cmpq $256,%rcx
ja 1256f
+ ALIGN_TEXT
103200:
movq %r10,(%rdi)
movq %r10,8(%rdi)