Module Name:    src
Committed By:   joerg
Date:           Tue Jan 18 00:26:58 UTC 2011

Modified Files:
        src/sys/arch/sh3/include: locore.h

Log Message:
Allow co-existance of traditional and modern CPP


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sh3/include/locore.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sh3/include/locore.h
diff -u src/sys/arch/sh3/include/locore.h:1.19 src/sys/arch/sh3/include/locore.h:1.20
--- src/sys/arch/sh3/include/locore.h:1.19	Sun Jun  1 00:46:01 2008
+++ src/sys/arch/sh3/include/locore.h	Tue Jan 18 00:26:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.19 2008/06/01 00:46:01 uwe Exp $	*/
+/*	$NetBSD: locore.h,v 1.20 2011/01/18 00:26:57 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -28,6 +28,21 @@
 
 #ifdef _LOCORE
 
+#ifdef __STDC__
+#if defined(SH3) && defined(SH4)
+#define	MOV(x, r)	mov.l .L_ ## x, r; mov.l @r, r
+#define	REG_SYMBOL(x)	.L_ ## x:	.long	_C_LABEL(__sh_ ## x)
+#define	FUNC_SYMBOL(x)	.L_ ## x:	.long	_C_LABEL(__sh_ ## x)
+#elif defined(SH3)
+#define	MOV(x, r)	mov.l .L_ ## x, r
+#define	REG_SYMBOL(x)	.L_ ## x:	.long	SH3_ ## x
+#define	FUNC_SYMBOL(x)	.L_ ## x:	.long	_C_LABEL(sh3_ ## x)
+#elif defined(SH4)
+#define	MOV(x, r)	mov.l .L_ ## x, r
+#define	REG_SYMBOL(x)	.L_ ## x:	.long	SH4_ ## x
+#define	FUNC_SYMBOL(x)	.L_ ## x:	.long	_C_LABEL(sh4_ ## x)
+#endif /* SH3 && SH4 */
+#else /* !__STDC__ */
 #if defined(SH3) && defined(SH4)
 #define	MOV(x, r)	mov.l .L_/**/x, r; mov.l @r, r
 #define	REG_SYMBOL(x)	.L_/**/x:	.long	_C_LABEL(__sh_/**/x)
@@ -41,6 +56,7 @@
 #define	REG_SYMBOL(x)	.L_/**/x:	.long	SH4_/**/x
 #define	FUNC_SYMBOL(x)	.L_/**/x:	.long	_C_LABEL(sh4_/**/x)
 #endif /* SH3 && SH4 */
+#endif /* __STDC__ */
 
 /*
  * BANK1 r6 contains current trapframe pointer.

Reply via email to