mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
add tests for P256 ARM assembly
This commit is contained in:
1 parent
443c34c66e
commit
95d421aa16
8 files changed
+287
-37
No files matched your search
@@ -0,0 +1,50 @@
|
||||
.syntax unified
|
||||
.thumb
|
||||
|
||||
.section .isr_vector, "a", %progbits
|
||||
.word _estack
|
||||
.word Reset_Handler
|
||||
.rept 14
|
||||
.word Default_Handler
|
||||
.endr
|
||||
|
||||
.section .text.Reset_Handler, "ax", %progbits
|
||||
.thumb_func
|
||||
.global Reset_Handler
|
||||
Reset_Handler:
|
||||
ldr sp, =_estack
|
||||
ldr r0, =_sidata
|
||||
ldr r1, =_sdata
|
||||
ldr r2, =_edata
|
||||
1:
|
||||
cmp r1, r2
|
||||
bcs 2f
|
||||
ldr r3, [r0], #4
|
||||
str r3, [r1], #4
|
||||
b 1b
|
||||
2:
|
||||
ldr r1, =_sbss
|
||||
ldr r2, =_ebss
|
||||
movs r3, #0
|
||||
3:
|
||||
cmp r1, r2
|
||||
bcs 4f
|
||||
str r3, [r1], #4
|
||||
b 3b
|
||||
4:
|
||||
bl main
|
||||
b exit
|
||||
|
||||
.thumb_func
|
||||
Default_Handler:
|
||||
ldr r0, =4
|
||||
ldr r1, =exception
|
||||
bkpt 0xab
|
||||
ldr r0, =0x18
|
||||
ldr r1, =0x20023
|
||||
bkpt 0xab
|
||||
b .
|
||||
|
||||
.section .rodata
|
||||
exception:
|
||||
.asciz "FAILURE: unhandled exception\n"
|
||||
Reference in new issue
Block a user