Help ensure that the copy loop doesn't get converted to a memcpy() call.

Reported and reviewed by: kib
X-MFC with:	r337715
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2018-08-14 19:21:31 +00:00
parent 53e992cfb9
commit b8abc9d8f5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337813

View File

@ -346,7 +346,7 @@ ucode_load_bsp(uintptr_t free)
addr = map_ucode(free, len);
/* We can't use memcpy() before ifunc resolution. */
for (i = 0; i < len; i++)
addr[i] = match[i];
addr[i] = ((volatile uint8_t *)match)[i];
match = addr;
if (loader->load(match, false) == 0) {