svn commit: trunk/uClibc/libc/sysdeps/linux/sh: bits sys

carmelo at uclibc.org carmelo at uclibc.org
Mon Feb 23 07:00:34 UTC 2009


Author: carmelo
Date: 2009-02-23 07:00:33 +0000 (Mon, 23 Feb 2009)
New Revision: 25414

Log:
Use gcc built-in defines for detecting SH cores instead of
uclibc config option macros (aligning SH to all other archs).

Changes applied as below:
__CONFIG_SH4__  -> __SH4__
__CONFIG_SH2__  -> __sh2__
__CONFIG_SH2A__ -> __SH2A__

Note: pay attention to capital letters

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>


Modified:
   trunk/uClibc/libc/sysdeps/linux/sh/___fpscr_values.S
   trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h
   trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
   trunk/uClibc/libc/sysdeps/linux/sh/clone.S
   trunk/uClibc/libc/sysdeps/linux/sh/sys/ucontext.h
   trunk/uClibc/libc/sysdeps/linux/sh/vfork.S


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/sh/___fpscr_values.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/___fpscr_values.S	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/___fpscr_values.S	2009-02-23 07:00:33 UTC (rev 25414)
@@ -21,7 +21,7 @@
 #include <features.h>
 
 .data
-#if defined(__CONFIG_SH4__)
+#ifdef __SH4__
 .global ___fpscr_values
 .type ___fpscr_values, at object
 .size ___fpscr_values,8

Modified: trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h	2009-02-23 07:00:33 UTC (rev 25414)
@@ -5,7 +5,7 @@
 #endif
 
 /* The Linux kernel uses different trap numbers on sh-2.  */
-#if defined __CONFIG_SH2__ || defined __CONFIG_SH2A__
+#if defined __sh2__ || defined __SH2A__
 # define __SH_SYSCALL_TRAP_BASE 0x20
 #else
 # define __SH_SYSCALL_TRAP_BASE 0x10

Modified: trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h	2009-02-23 07:00:33 UTC (rev 25414)
@@ -6,7 +6,7 @@
 #define _BITS_UCLIBC_ARCH_FEATURES_H
 
 /* instruction used when calling abort() to kill yourself */
-#if defined(__CONFIG_SH2__)
+#ifdef __sh2__
 # define __UCLIBC_ABORT_INSTRUCTION__ "trapa #32"
 #else
 # define __UCLIBC_ABORT_INSTRUCTION__ "trapa #0xff"

Modified: trunk/uClibc/libc/sysdeps/linux/sh/clone.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/clone.S	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/clone.S	2009-02-23 07:00:33 UTC (rev 25414)
@@ -62,7 +62,7 @@
 	mov	r6, r4
 	trapa	#(__SH_SYSCALL_TRAP_BASE + 2)
 	mov     r0, r1
-#ifdef __CONFIG_SH2__
+#ifdef __sh2__
 /* 12 arithmetic shifts for the crappy sh2, because shad doesn't exist!	 */
 	shar	r1
 	shar	r1

Modified: trunk/uClibc/libc/sysdeps/linux/sh/sys/ucontext.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/sys/ucontext.h	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/sys/ucontext.h	2009-02-23 07:00:33 UTC (rev 25414)
@@ -98,7 +98,7 @@
     unsigned int mach;
     unsigned int macl;
 
-#ifdef __CONFIG_SH4__
+#ifdef __SH4__
     /* FPU registers */
     fpregset_t fpregs;
     fpregset_t xfpregs;

Modified: trunk/uClibc/libc/sysdeps/linux/sh/vfork.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/vfork.S	2009-02-22 20:12:50 UTC (rev 25413)
+++ trunk/uClibc/libc/sysdeps/linux/sh/vfork.S	2009-02-23 07:00:33 UTC (rev 25414)
@@ -41,7 +41,7 @@
 	mov.w	.L2, r3
 	trapa	#__SH_SYSCALL_TRAP_BASE
 	mov     r0, r1
-#ifdef __CONFIG_SH2__
+#ifdef __sh2__
 /* 12 arithmetic shifts for the crappy sh2, because shad doesn't exist!	 */
 	shar	r1
 	shar	r1
@@ -72,7 +72,7 @@
 	mov.w	.L3, r3
 	trapa	#__SH_SYSCALL_TRAP_BASE
 	mov     r0, r1
-#ifdef __CONFIG_SH2__
+#ifdef __sh2__
 /* 12 arithmetic shifts for the crappy sh2, because shad doesn't exist!	 */
 	shar	r1
 	shar	r1



More information about the uClibc-cvs mailing list