]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/lib/builtins/arm/aeabi_div0.c
1 /* ===-- aeabi_div0.c - ARM Runtime ABI support routines for compiler-rt ---===
3 * The LLVM Compiler Infrastructure
5 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
8 * ===----------------------------------------------------------------------===
10 * This file implements the division by zero helper routines as specified by the
11 * Run-time ABI for the ARM Architecture.
13 * ===----------------------------------------------------------------------===
17 * RTABI 4.3.2 - Division by zero
19 * The *div0 functions:
20 * - Return the value passed to them as a parameter
21 * - Or, return a fixed value defined by the execution environment (such as 0)
22 * - Or, raise a signal (often SIGFPE) or throw an exception, and do not return
24 * An application may provide its own implementations of the *div0 functions to
25 * for a particular behaviour from the *div and *divmod functions called out of
29 /* provide an unused declaration to pacify pendantic compilation */
30 extern unsigned char declaration
;
32 #if defined(__ARM_EABI__)
33 int __attribute__((weak
)) __attribute__((visibility("hidden")))
34 __aeabi_idiv0(int return_value
) {
38 long long __attribute__((weak
)) __attribute__((visibility("hidden")))
39 __aeabi_ldiv0(long long return_value
) {