You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/28 02:14:35 UTC
[36/50] [abbrv] incubator-mynewt-core git commit: cortex-m0;
trap on divide-by-zero.
cortex-m0; trap on divide-by-zero.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c2959dc7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c2959dc7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c2959dc7
Branch: refs/heads/master
Commit: c2959dc7c9eb869b4100650740e7095874dd4256
Parents: f0556b1
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Apr 21 15:36:21 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Apr 21 15:37:16 2016 -0700
----------------------------------------------------------------------
libs/os/src/arch/cortex_m0/m0/HAL_CM0.s | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c2959dc7/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
----------------------------------------------------------------------
diff --git a/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s b/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
index 7cc7f1c..03d7957 100644
--- a/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
+++ b/libs/os/src/arch/cortex_m0/m0/HAL_CM0.s
@@ -200,6 +200,23 @@ SysTick_Handler:
.fnend
.size SysTick_Handler, .-SysTick_Handler
+/* divide-by-zero */
+ .thumb_func
+ .type __aeabi_idiv0, %function
+ .global __aeabi_idiv0
+ .global __aeabi_ldiv0
+__aeabi_idiv0:
+__aeabi_ldiv0:
+ .fnstart
+ .cantunwind
+ push {r0,r1,r5}
+ ldr r0, =file_name
+ ldr r1, =__LINE__
+ ldr r5, =__assert_func
+ bx r5
+ .fnend
+ .size __aeabi_idiv0, .-__aeabi_idiv0
+
/*-------------------------- Defalt IRQ --------------------------------*/
.thumb_func
.type os_default_irq_asm, %function
@@ -251,6 +268,9 @@ using_msp_as_sp:
.section ".data"
.global __aeabi_unwind_cpp_pr0
__aeabi_unwind_cpp_pr0:
+ .section ".rodata"
+file_name:
+ .asciz __FILE__
.end
/*----------------------------------------------------------------------------