Skip to content

Commit

Permalink
memset wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lukileczo committed Mar 1, 2024
1 parent 13e1a53 commit 8db0322
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions arch/armv7a/memset.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Phoenix-RTOS
*
* libphoenix
*
* memset
*
* Copyright 2024 Phoenix Systems
* Author: Lukasz Leczkowski
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/

#define DST r3
#define VAL r1
#define LEN r2

.thumb
.syntax unified

.text
.align 4

/* void *memset(void *dst, int v, size_t l) */
.thumb_func

.globl memset
.type memset, %function
memset:
cbz r2, .Lreturn
mov DST, r0

/* check alignment */
ands r3, r0, #7
beq .Laligned






.Lreturn:
bx lr

0 comments on commit 8db0322

Please sign in to comment.