mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 07:50:57 +00:00
20 lines
558 B
ArmAsm
20 lines
558 B
ArmAsm
.syntax unified
|
|
|
|
.text
|
|
|
|
.global memset_reg
|
|
.type memset_reg, STT_FUNC
|
|
memset_reg:
|
|
// call with the following (note that the arguments are not validated prior to use):
|
|
// r0 - address of first word to write (inclusive)
|
|
// r1 - address of first word following the address in r0 to NOT write (exclusive)
|
|
// r2 - word value to be written
|
|
// both addresses in r0 and r1 needs to be divisible by 4!
|
|
.L_loop_begin:
|
|
str r2, [r0], 4 // store the word in r2 to the address in r0, post-indexed
|
|
cmp r0, r1
|
|
bne .L_loop_begin
|
|
bx lr
|
|
|
|
.end
|