Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Feb 2026 16:28:13 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 244f498074b5 - main - libmd aarch64: Use ands instead of bics to round down the length
Message-ID:  <698a0b1d.1d98f.16719417@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=244f498074b5574d18d4518583863580498b8d3b

commit 244f498074b5574d18d4518583863580498b8d3b
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-02-09 16:26:29 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-02-09 16:26:29 +0000

    libmd aarch64: Use ands instead of bics to round down the length
    
    GNU as does not accept bics with two register operands but instead
    requires three register operands.  However, clang assembles the bics
    instruction to ands anyway, so just use ands directly.
    
    Reviewed by:    fuz
    Differential Revision:  https://reviews.freebsd.org/D55155
---
 lib/libmd/aarch64/md5block.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libmd/aarch64/md5block.S b/lib/libmd/aarch64/md5block.S
index b928c8dd795a..297db7f6bdbd 100644
--- a/lib/libmd/aarch64/md5block.S
+++ b/lib/libmd/aarch64/md5block.S
@@ -134,7 +134,7 @@ d_	.req	m5
 	stp	x23, x24, [sp, #0x20]
 	stp	x25, x26, [sp, #0x30]
 
-	bics	len, len, #63		// length in blocks
+	ands	len, len, #~63		// length in blocks
 	add	end, buf, len		// end pointer
 
 	beq	.Lend			// was len == 0 after BICS?


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698a0b1d.1d98f.16719417>