From 6c6720bb831b14c77d3eb8f5f7061e095df6ea47 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 15 Dec 2010 18:00:16 +0100 Subject: sh_fpu: Do not allow inclusion of fpu_control on not SH4 core Instead of emitting a warning even when compiling for SH4, stop compilation with an #error directive when not on SH4 core. Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/sh/fpu_control.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/sh') diff --git a/libc/sysdeps/linux/sh/fpu_control.h b/libc/sysdeps/linux/sh/fpu_control.h index cbd889ece..da01725cb 100644 --- a/libc/sysdeps/linux/sh/fpu_control.h +++ b/libc/sysdeps/linux/sh/fpu_control.h @@ -20,7 +20,9 @@ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H -#warning This file is only correct for sh4 +#ifndef __SH4__ +#error This file is only correct for sh4 +#endif /* masking of interrupts */ #define _FPU_MASK_VM 0x0800 /* Invalid operation */ -- cgit v1.2.3 From 6ac247452e646c2187f2f559143c8c087b0542e0 Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Fri, 17 Dec 2010 09:58:25 +0100 Subject: libm_sh: add optimised assembly implementation of lroundf and lrintf * libc/sysdeps/linux/sh/sysdep.h: Add LOCAL macro * libm/sh/sh4/Makefile.arch: Include asm source in the build * libm/sh/sh4/s_lrintf.S [NEW]: optimised asm lrintf * libm/sh/sh4/s_lroundf.S [NEW]: optimised asm lroundf Signed-off-by: Christian Bruel Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/sh/sysdep.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libc/sysdeps/linux/sh') diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h index 2ef0a3305..8b3c68220 100644 --- a/libc/sysdeps/linux/sh/sysdep.h +++ b/libc/sysdeps/linux/sh/sysdep.h @@ -26,6 +26,7 @@ /* Syntactic details of assembler. */ +#define LOCAL(X) .L_##X #define ALIGNARG(log2) log2 /* For ELF we need the `.type' directive to make shared libs work right. */ #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,@##typearg; -- cgit v1.2.3