Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/aeabi_memset.S
35291 views
//===-- aeabi_memset.S - EABI memset implementation -----------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "../assembly.h"910// void __aeabi_memset(void *dest, size_t n, int c) { memset(dest, c, n); }11// void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }1213.syntax unified14.p2align 215DEFINE_COMPILERRT_FUNCTION(__aeabi_memset)16mov r3, r117mov r1, r218mov r2, r319#ifdef USE_THUMB_120push {r7, lr}21bl memset22pop {r7, pc}23#else24b memset25#endif26END_COMPILERRT_FUNCTION(__aeabi_memset)2728DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset4, __aeabi_memset)29DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset8, __aeabi_memset)3031.p2align 232DEFINE_COMPILERRT_FUNCTION(__aeabi_memclr)33mov r2, r134movs r1, #035#ifdef USE_THUMB_136push {r7, lr}37bl memset38pop {r7, pc}39#else40b memset41#endif42END_COMPILERRT_FUNCTION(__aeabi_memclr)4344DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr)45DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr)4647NO_EXEC_STACK_DIRECTIVE48495051