forked from len0rd/rockbox
arm: add div0 handler for 64-bit division on ARMv7-M
Even though ARMv7-M has a hardware divider, 64-bit division is
handled in software and needs a div0 handler. The libgcc routines
call __aeabi_{i,l}div0 so we alias those to __div0.
Change-Id: I5152c43d39e25e03f31404753f13978a614aca06
This commit is contained in:
parent
545506c923
commit
6ea328f0f1
3 changed files with 14 additions and 1 deletions
|
|
@ -38,6 +38,14 @@ void UIE(void)
|
|||
while (1);
|
||||
}
|
||||
|
||||
void __div0(void)
|
||||
{
|
||||
while (1);
|
||||
}
|
||||
|
||||
void __aeabi_idiv0(void) __attribute__((alias("__div0")));
|
||||
void __aeabi_ldiv0(void) __attribute__((alias("__div0")));
|
||||
|
||||
#define ATTR_IRQ_HANDLER __attribute__((weak, alias("UIE")))
|
||||
|
||||
void nmi_handler(void) ATTR_IRQ_HANDLER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue