From 2cda82eeea484e2d46908462f755edcb4ef56cce Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 4 Feb 2018 05:38:49 +0100 Subject: Fix handling of misaligned bytes in fill --- arch/x64/linux/memory/fill.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/x64/linux/memory/fill.S b/arch/x64/linux/memory/fill.S index d4fc0ac..2717aa1 100644 --- a/arch/x64/linux/memory/fill.S +++ b/arch/x64/linux/memory/fill.S @@ -37,6 +37,11 @@ _D5tanya6memory2op10fillMemoryFNaNbNiAvmZv: mov %rsi, %r8 + // If the length is less than the number of misaligned bytes, + // write one byte at a time and exit + cmp %rax, %rcx + jg aligned_1 + naligned: mov %dl, (%r8) // Write a byte -- cgit v1.2.3