xref: /freebsd/contrib/arm-optimized-routines/string/aarch64/memset-mops.S (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1/*
2 * memset using MOPS extension.
3 *
4 * Copyright (c) 2023, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
6 */
7
8#include "asmdefs.h"
9
10ENTRY (__memset_aarch64_mops)
11	PTR_ARG (0)
12	SIZE_ARG (2)
13
14	mov     x3, x0
15	.inst   0x19c10443	/* setp    [x3]!, x2!, x1  */
16	.inst   0x19c14443	/* setm    [x3]!, x2!, x1  */
17	.inst   0x19c18443	/* sete    [x3]!, x2!, x1  */
18	ret
19
20END (__memset_aarch64_mops)
21