Last active
November 8, 2017 06:16
-
-
Save hathach/d89444182ed5e65f9405c70c6000b960 to your computer and use it in GitHub Desktop.
asm to fill stack with pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Fill stack with pattern to allow checking of stack usage | |
| * __StackLimit : lower address of stack region | |
| */ | |
| ldr r0, =__StackLimit | |
| ldr r1, =__StackSize | |
| ldr r2, =0xADADADAD | |
| .L_fill: | |
| str r2, [r0] | |
| adds r0, 4 | |
| subs r1, 4 | |
| bne .L_fill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment