2016-11-28 23:12:49 +00:00
|
|
|
#if !defined __STRICT_ANSI__ && !defined __cplusplus
|
|
|
|
# include <sysdep.h>
|
|
|
|
# undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */
|
2012-04-17 02:02:27 +00:00
|
|
|
|
|
|
|
/* Support for compatible assembler handling. */
|
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
|
2012-04-17 02:02:27 +00:00
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define LOCAL_LIBM_ENTRY(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
.proc name; \
|
|
|
|
name:
|
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define LOCAL_LIBM_END(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
.endp name; \
|
|
|
|
ASM_SIZE_DIRECTIVE(name)
|
|
|
|
|
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define RODATA .rodata
|
|
|
|
# define LOCAL_OBJECT_START(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
name:; \
|
2012-08-12 18:44:36 +00:00
|
|
|
.type name, @object
|
2016-11-28 23:12:49 +00:00
|
|
|
# define LOCAL_OBJECT_END(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
ASM_SIZE_DIRECTIVE(name)
|
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define GLOBAL_LIBM_ENTRY(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
LOCAL_LIBM_ENTRY(name); \
|
|
|
|
.global name
|
2016-11-28 23:12:49 +00:00
|
|
|
# define GLOBAL_LIBM_END(name) LOCAL_LIBM_END(name)
|
2012-04-17 02:02:27 +00:00
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define INTERNAL_LIBM_ENTRY(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
GLOBAL_LIBM_ENTRY(__libm_##name); \
|
|
|
|
.global __libm_##name
|
2016-11-28 23:12:49 +00:00
|
|
|
# define INTERNAL_LIBM_END(name) GLOBAL_LIBM_END(__libm_##name)
|
2012-04-17 02:02:27 +00:00
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define WEAK_LIBM_ENTRY(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
.align 32; \
|
|
|
|
LOCAL_LIBM_ENTRY(__##name); \
|
|
|
|
.global __##name; \
|
|
|
|
__##name:
|
2016-11-28 23:12:49 +00:00
|
|
|
# define WEAK_LIBM_END(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
weak_alias (__##name, name); \
|
|
|
|
.hidden __##name; \
|
|
|
|
LOCAL_LIBM_END(__##name); \
|
|
|
|
ASM_SIZE_DIRECTIVE(__##name); \
|
2012-08-12 18:44:36 +00:00
|
|
|
.type __##name, @function
|
2012-04-17 02:02:27 +00:00
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# define GLOBAL_IEEE754_ENTRY(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
WEAK_LIBM_ENTRY(name); \
|
|
|
|
.global __ieee754_##name; \
|
|
|
|
.hidden __ieee754_##name; \
|
|
|
|
__ieee754_##name:
|
2016-11-28 23:12:49 +00:00
|
|
|
# define GLOBAL_IEEE754_END(name) \
|
2012-04-17 02:02:27 +00:00
|
|
|
WEAK_LIBM_END(name); \
|
|
|
|
ASM_SIZE_DIRECTIVE(__ieee754_##name); \
|
2012-08-12 18:44:36 +00:00
|
|
|
.type __ieee754_##name, @function
|
2012-04-17 02:02:27 +00:00
|
|
|
|
2016-11-28 23:12:49 +00:00
|
|
|
# if defined ASSEMBLER && IS_IN (libc)
|
|
|
|
# define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support)
|
|
|
|
# endif
|
2012-04-17 02:02:27 +00:00
|
|
|
#endif
|