[kaffe] CVS kaffe (guilhem): Generic fast integer types.

Kaffe CVS cvs-commits at kaffe.org
Sun Apr 17 13:40:46 PDT 2005


PatchSet 5680 
Date: 2005/04/17 20:36:36
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Generic fast integer types.

        * config/generic/gentypes.h: New file.

        * config/alpha/common.h,
        config/arm/common.h,
        config/i386/atomic.h,
        config/i386/common.h,
        config/ia64/common.h,
        config/m68k/common.h,
        config/mips/common.h,
        config/parisc/common.h,
        config/powerpc/common.h,
        config/s390/common.h,
        config/sh/common.h,
        config/sparc/common.h,
        config/x86_64/common.h: Include gentypes.h

        * config/generic/comparexch.h: Fixed include.

Members: 
	ChangeLog:1.3846->1.3847 
	config/alpha/common.h:INITIAL->1.14 
	config/arm/common.h:INITIAL->1.14 
	config/generic/comparexch.h:1.1->1.2 
	config/generic/gentypes.h:INITIAL->1.1 
	config/i386/atomic.h:1.3->1.4 
	config/i386/common.h:INITIAL->1.21 
	config/ia64/common.h:INITIAL->1.8 
	config/m68k/common.h:INITIAL->1.18 
	config/mips/common.h:INITIAL->1.17 
	config/parisc/common.h:INITIAL->1.8 
	config/powerpc/common.h:INITIAL->1.12 
	config/s390/common.h:INITIAL->1.7 
	config/sh/common.h:1.4->1.5 
	config/sparc/common.h:INITIAL->1.13 
	config/x86_64/common.h:INITIAL->1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3846 kaffe/ChangeLog:1.3847
--- kaffe/ChangeLog:1.3846	Sun Apr 17 12:32:42 2005
+++ kaffe/ChangeLog	Sun Apr 17 20:36:36 2005
@@ -1,3 +1,23 @@
+2005-04-17  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* config/generic/gentypes.h: New file.
+
+	* config/alpha/common.h,
+	config/arm/common.h, 
+	config/i386/atomic.h,
+	config/i386/common.h,
+	config/ia64/common.h, 
+	config/m68k/common.h,
+	config/mips/common.h,
+	config/parisc/common.h,
+	config/powerpc/common.h,
+	config/s390/common.h,
+	config/sh/common.h,
+	config/sparc/common.h,
+	config/x86_64/common.h: Include gentypes.h
+
+	* config/generic/comparexch.h: Fixed include.
+	
 2005-04-17  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffe/version.c (printShortVersion): Changed first string
===================================================================
Checking out kaffe/config/alpha/common.h
RCS:  /home/cvs/kaffe/kaffe/config/alpha/common.h,v
VERS: 1.14
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/alpha/common.h	Sun Apr 17 20:40:45 2005
@@ -0,0 +1,33 @@
+/*
+ * alpha/common.h
+ * Common Alpha configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ *
+ * by Alexandre Oliva <oliva at dcc.unicamp.br>
+ * and Edouard G. Parmelan <egp at free.fr>
+ */
+
+#ifndef __alpha_common_h
+#define __alpha_common_h
+
+#include "generic/gentypes.h"
+
+#if defined(NEED_sysdepCallMethod)
+
+#define LONG_SYSDEP 1
+#include "sysdepCallMethod.h"
+#undef LONG_SYSDEP
+#include "sysdepCallMethod.h"
+
+#endif /* defined(NEED_sysdepCallMethod) */
+
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/arm/common.h
RCS:  /home/cvs/kaffe/kaffe/config/arm/common.h,v
VERS: 1.14
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/arm/common.h	Sun Apr 17 20:40:45 2005
@@ -0,0 +1,30 @@
+/*
+ * arm/common.h
+ * Common arm configuration information.
+ *
+ * Copyright (c) 1996, 1997
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ *
+ * Written by Godmar Back <gback at cs.utah.edu>
+ */
+
+#ifndef __arm_common_h
+#define __arm_common_h
+
+#include "generic/gentypes.h"
+
+/* The arm never aligns to more than a 4 byte boundary. */
+#define	ALIGNMENT_OF_SIZE(S)	((S) < 4 ? (S) : 4)
+
+#include "gccbuiltin.h"
+#include "katomic.h"
+#include "generic/genatomic.h"
+#include "generic/comparexch.h"
+
+#endif
Index: kaffe/config/generic/comparexch.h
diff -u kaffe/config/generic/comparexch.h:1.1 kaffe/config/generic/comparexch.h:1.2
--- kaffe/config/generic/comparexch.h:1.1	Sun Mar 20 20:30:38 2005
+++ kaffe/config/generic/comparexch.h	Sun Apr 17 20:36:40 2005
@@ -2,6 +2,7 @@
 /*
  * Do an atomic compare and exchange.  The address 'A' is checked against  
  * value 'O' and if they match it's exchanged with value 'N'.
- * We return '1' if the exchange is sucessful, otherwise 0.
+ * We return '1' if the exchange is sucessful (that is if (*A) == (O)),
+ * otherwise 0.
  */
 #define COMPARE_AND_EXCHANGE(A,O,N) (atomic_compare_and_exchange_val_acq((A), (N), (O)) == (O))
===================================================================
Checking out kaffe/config/generic/gentypes.h
RCS:  /home/cvs/kaffe/kaffe/config/generic/gentypes.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/generic/gentypes.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,49 @@
+/*
+ * generic/gentypes.h
+ * Generic code for atomic operations.
+ *
+ * Copyright (c) 2005
+ *       Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __KAFFE_GENTYPES_H
+#define __KAFFE_GENTYPES_H
+
+#include "config.h"
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+
+#if defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#if !defined(HAVE_INT_FAST8_T)
+typedef int8_t int_fast8_t;
+#endif
+
+#if !defined(HAVE_INT_FAST16_T)
+typedef int16_t int_fast16_t;
+#endif
+
+#if !defined(HAVE_INT_FAST32_T)
+typedef int32_t int_fast32_t;
+#endif
+
+#if !defined(HAVE_INT_FAST64_T)
+typedef int64_t int_fast64_t;
+#endif
+
+#if !defined(HAVE_UINTMAX_T)
+typedef uint64_t uintmax_t;
+#endif
+
+#if !defined(HAVE_UINTMAX_T)
+typedef int64_t intmax_t;
+#endif
+
+#endif
Index: kaffe/config/i386/atomic.h
diff -u kaffe/config/i386/atomic.h:1.3 kaffe/config/i386/atomic.h:1.4
--- kaffe/config/i386/atomic.h:1.3	Fri Apr  1 20:15:35 2005
+++ kaffe/config/i386/atomic.h	Sun Apr 17 20:36:40 2005
@@ -19,79 +19,30 @@
 
 #include "config.h"
 
-#if defined(HAVE_STDINT_H)
-#include <stdint.h>
-#endif 
-
-#if defined(HAVE_INTTYPES_H)
-#include <inttypes.h>
-#endif
-
 typedef int8_t atomic8_t;
 typedef uint8_t uatomic8_t;
-#if defined(HAVE_INT_FAST8_T)
 typedef int_fast8_t atomic_fast8_t;
-#else
-typedef int8_t atomic_fast8_t;
-#endif
-#if defined(HAVE_UINT_FAST8_T)
 typedef uint_fast8_t uatomic_fast8_t;
-#else
-typedef uint8_t uatomic_fast8_t;
-#endif
 
 typedef int16_t atomic16_t;
 typedef uint16_t uatomic16_t;
-#if defined(HAVE_INT_FAST16_T)
 typedef int_fast16_t atomic_fast16_t;
-#else
-typedef int16_t atomic_fast16_t;
-#endif
-#if defined(HAVE_UINT_FAST16_T)
 typedef uint_fast16_t uatomic_fast16_t;
-#else
-typedef uint16_t uatomic_fast16_t;
-#endif
 
 typedef int32_t atomic32_t;
 typedef uint32_t uatomic32_t;
-#if defined(HAVE_INT_FAST32_T)
 typedef int_fast32_t atomic_fast32_t;
-#else
-typedef int32_t atomic_fast32_t;
-#endif
-#if defined(HAVE_UINT_FAST32_T)
 typedef uint_fast32_t uatomic_fast32_t;
-#else
-typedef uint32_t uatomic_fast32_t;
-#endif
 
 typedef int64_t atomic64_t;
 typedef uint64_t uatomic64_t;
-#if defined(HAVE_INT_FAST64_T)
 typedef int_fast64_t atomic_fast64_t;
-#else
-typedef int64_t atomic_fast64_t;
-#endif
-#if defined(HAVE_UINT_FAST64_T)
 typedef uint_fast64_t uatomic_fast64_t;
-#else
-typedef uint64_t uatomic_fast64_t;
-#endif
 
 typedef intptr_t atomicptr_t;
 typedef uintptr_t uatomicptr_t;
-#if defined(HAVE_UINTMAX_T)
 typedef uintmax_t uatomic_max_t;
-#else
-typedef uint64_t uatomic_max_t;
-#endif
-
-#if defined(HAVE_INTMAX_T)
 typedef intmax_t atomic_max_t;
-#else
-typedef int64_t atomic_max_t;
-#endif
 
 #ifndef LOCK_PREFIX
 # ifdef UP
===================================================================
Checking out kaffe/config/i386/common.h
RCS:  /home/cvs/kaffe/kaffe/config/i386/common.h,v
VERS: 1.21
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/i386/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,61 @@
+/*
+ * i386/common.h
+ * Common i386 configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __i386_h
+#define __i386_h
+
+#include "generic/gentypes.h"
+
+#if defined(NEED_sysdepCallMethod)
+#include "sysdepCallMethod.h"
+#endif /* defined(NEED_sysdepCallMethod) */
+
+/* The 386 never aligns to more than a 4 byte boundary. */
+#define	ALIGNMENT_OF_SIZE(S)	((S) < 4 ? (S) : 4)
+
+#if defined(__GNUC__)
+#define KAFFE_PROFILER 1
+#endif
+
+#if defined(KAFFE_PROFILER)
+
+/* profiler clicks counter type.  */
+typedef int64	profiler_click_t;
+
+/* ReaD the processor Time Stamp Counter.
+ * This is a macro to help GCC optimization.
+ * The rdtsc instruction load TSC to edx:eax aka A register.  */
+#define profiler_get_clicks(COUNTER)	\
+	asm volatile (".byte 0xf; .byte 0x31" /* "rdtsc" */ : "=A" (COUNTER))
+
+#endif
+
+#ifndef KAFFE_PLUS_M_ASM_CONSTRAINT
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+#  define KAFFE_PLUS_M_ASM_CONSTRAINT "+m"
+# else
+#  define KAFFE_PLUS_M_ASM_CONSTRAINT "=m"
+/* Note: it should really be `+m', to indicate both input and output,
+   but gcc 2.7 didn't accept it yet.  As long as we don't assign to
+   *(A) ``just before'' COMPARE_AND_EXCHANGE, so that gcc could
+   consider the assignment dead, it should be fine.  */
+# endif
+#endif
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/ia64/common.h
RCS:  /home/cvs/kaffe/kaffe/config/ia64/common.h,v
VERS: 1.8
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/ia64/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,39 @@
+/*
+ * ia64/common.h
+ * Common IA-64 configuration information.
+ *
+ * Copyright (c) 2001
+ *	MandrakeSoft.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __ia64_common_h
+#define __ia64_common_h
+
+#include "generic/gentypes.h"
+
+#define NEED_STACK_ALIGN
+#define STACK_ALIGN(p)  ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))
+
+#if defined(NEED_sysdepCallMethod)
+#include "sysdepCallMethod.h"
+#endif /* defined(NEED_sysdepCallMethod) */
+
+/*
+ * Do an atomic compare and exchange.  The address 'A' is checked
+ * against value 'O' and if they match it's exchanged with value 'N'.
+ * We return '1' if the exchange is sucessful, otherwise 0.
+ */
+
+#ifdef HAVE_IA64INTRIN_H
+#include <ia64intrin.h>
+#endif
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/m68k/common.h
RCS:  /home/cvs/kaffe/kaffe/config/m68k/common.h,v
VERS: 1.18
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/m68k/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,34 @@
+/*
+ * m68k/common.h
+ * Common M68K configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ *
+ * Written by Kiyo Inaba <k-inaba at mxb.mesh.ne.jp>, 1998;
+ * Based on the ports
+ *      by Remi Perrot <r_perrot at mail.club-internet.fr> to m68k/linux
+ * and
+ *      by Alexandre Oliva <oliva at dcc.unicamp.br> to sparc
+ *
+ * Modified by Kiyo Inaba <k-inaba at mxb.mesh.ne.jp>, 1999 to support
+ *	both linux and netbsd1.
+ */
+
+#ifndef __m68k_common_h
+#define __m68k_common_h
+
+#include "generic/gentypes.h"
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/mips/common.h
RCS:  /home/cvs/kaffe/kaffe/config/mips/common.h,v
VERS: 1.17
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/mips/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,51 @@
+/*
+ * mips/common.h
+ * Common MIPS configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ *
+ * by Alexandre Oliva <oliva at dcc.unicamp.br>
+ * and Edouard G. Parmelan <egp at free.fr>
+ */
+
+#ifndef __mips_common_h
+#define __mips_common_h
+
+#include "generic/gentypes.h"
+
+/* The R5900 is the Mips Core in the PS2 (Playstation 2)
+* It has most of the Mips III instructions set, some of the Mips IV 
+* instructions, it lacks the Mips II "ll" and "sc" instructions and 
+* it has 128 bit GP registers and 32 bit FPU registers. There is no 
+* FPU Emulation present in the default kernel. Since no 64 bit
+* FPU registers exist, doubles are passed in 2 GP registers.
+*/
+#ifdef _R5900
+#define PS2LINUX
+#undef HAVE_MIPSII_INSTRUCTIONS
+#endif 
+
+#include "gccbuiltin.h"
+
+/* Atomicity is temporarily disabled because the compare_and_swap function 
+ * do not return the right value. Use the generic one instead.
+ */
+#if defined(HAVE_MIPSII_INSTRUCTIONS) && 0
+#include "atomic.h"
+#else
+
+#include "generic/genatomic.h"
+
+#endif /* defined(HAVE_MIPSII_INSTRUCTIONS) */
+
+#include "generic/comparexch.h"
+#include "katomic.h"
+    
+#endif
===================================================================
Checking out kaffe/config/parisc/common.h
RCS:  /home/cvs/kaffe/kaffe/config/parisc/common.h,v
VERS: 1.8
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/parisc/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,30 @@
+/*
+ * parisc/common.h
+ * Common configuration information for PA-RISC based machines.
+ *
+ * Copyright (c) 1996, 1997, 1998
+ *      Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ *
+ * sysdepCallMethod is written by Pavel Roskin <pavel_roskin at geocities.com>
+ */
+
+#ifndef __parisc_common_h
+#define __parisc_common_h
+
+#include "generic/gentypes.h"
+
+#define NEED_STACK_ALIGN
+#define STACK_ALIGN(p)  ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))
+
+#include "gccbuiltin.h"
+#include "generic/genatomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/powerpc/common.h
RCS:  /home/cvs/kaffe/kaffe/config/powerpc/common.h,v
VERS: 1.12
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/powerpc/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,38 @@
+/*
+ * powerpc/common.h
+ * Common PowerPC configuration information.
+ *
+ * Copyright (c) 2001
+ *	Edouard G. Parmelan.  All rights reserved.
+ *
+ * Copyright (c) 2001
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __powerpc_common_h
+#define __powerpc_common_h
+
+#include "generic/gentypes.h"
+
+#define NEED_STACK_ALIGN
+#define STACK_ALIGN(p)  ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))
+
+/* This define will cause callMethodV and callMethodA to avoid
+   introducing unused slots after jlongs and jdoubles.  */
+#ifndef NO_HOLES
+# define NO_HOLES 1
+#endif
+
+#if defined(NEED_sysdepCallMethod)
+#include "sysdepCallMethod.h"
+#endif /* defined(NEED_sysdepCallMethod) */
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/s390/common.h
RCS:  /home/cvs/kaffe/kaffe/config/s390/common.h,v
VERS: 1.7
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/s390/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,51 @@
+/*
+ * s390/common.h (cloned from s390/common.h by ROSSP)
+ * Common s390 configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ * Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __s390_h
+#define __s390_h
+
+#include "generic/gentypes.h"
+
+/* The s390 gcc port aligns to the appropriate boundary: 1->1, 2->2, 4->4,
+   and 8->8.  So alignment is pretty simple: */
+#define  ALIGNMENT_OF_SIZE(S) (S)
+
+#if defined(__GNUC__)
+#define KAFFE_PROFILER 1
+#endif
+
+#if defined(KAFFE_PROFILER)
+
+/* profiler clicks counter type.  */
+typedef int64  profiler_click_t;
+
+/* ReaD the processor Time Stamp Counter.
+ * This is a macro to help GCC optimization. 
+ * The rdtsc instruction load TSC to edx:eax aka A register.  */
+#if 1 /* Not ready yet */
+#define profiler_get_clicks(COUNTER)    \
+   The s390 port does not have a profiler_get_clicks macro yet!
+#else
+#define profiler_get_clicks(COUNTER)    \
+   asm volatile (".byte 0xf; .byte 0x31" /* "rdtsc" */ : "=A" (COUNTER))
+#endif /* if 1 */
+
+#endif
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif /* __s390_h */
Index: kaffe/config/sh/common.h
diff -u kaffe/config/sh/common.h:1.4 kaffe/config/sh/common.h:1.5
--- kaffe/config/sh/common.h:1.4	Sat Apr  2 10:09:46 2005
+++ kaffe/config/sh/common.h	Sun Apr 17 20:36:43 2005
@@ -15,6 +15,8 @@
 #if !defined(__sh_common_h)
 #define __sh_common_h
 
+#include "generic/gentypes.h"
+
 /* The SuperH never aligns to more than a 4 byte boundary. */
 #define	ALIGNMENT_OF_SIZE(S)	((S) < 4 ? (S) : 4)
 
===================================================================
Checking out kaffe/config/sparc/common.h
RCS:  /home/cvs/kaffe/kaffe/config/sparc/common.h,v
VERS: 1.13
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/sparc/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,45 @@
+/*
+ * sparc/common.h
+ * Common SPARC configuration information.
+ *
+ * Copyright (c) 1996, 1997, 1998, 1999
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ *
+ * by Alexandre Oliva <oliva at dcc.unicamp.br>
+ */
+
+#ifndef __sparc_common_h
+#define __sparc_common_h
+
+#include "generic/gentypes.h"
+
+#include "gccbuiltin.h"
+
+/* Include the right compare_and_swap definition */
+#if defined(__sparcv9)
+#include "atomic-sparc32v9.h"
+#else /* !defined(__sparcv9) */
+#if defined(__arch64__)
+#include "atomic-sparc64.h"
+#else /* !defined(__arch64__) */
+#include "atomic-sparc32.h"
+#endif /* defined(__arch64__) */
+#endif /* defined(__sparcv9) */
+
+#include "katomic.h"
+
+#if defined(NEED_sysdepCallMethod)
+
+#define LONG_SYSDEP 1
+#include "sysdepCallMethod.h"
+#undef LONG_SYSDEP
+#include "sysdepCallMethod.h"
+
+#endif /* defined(NEED_sysdepCallMethod) */
+
+#include "generic/comparexch.h"
+
+#endif
===================================================================
Checking out kaffe/config/x86_64/common.h
RCS:  /home/cvs/kaffe/kaffe/config/x86_64/common.h,v
VERS: 1.6
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/x86_64/common.h	Sun Apr 17 20:40:46 2005
@@ -0,0 +1,65 @@
+/*
+ * x86_64/common.h
+ * Common X86-64 configuration information.
+ *
+ * Copyright (c) 2002
+ *	MandrakeSoft.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __x86_64_common_h
+#define __x86_64_common_h
+
+#include "generic/gentypes.h"
+
+/* Stack must be aligned on 16-bytes boundary.  */
+#define NEED_STACK_ALIGN
+#define STACK_ALIGN(p)  ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))
+
+/* This define will cause callMethodV and callMethodA to avoid
+   introducing unused slots after jlongs and jdoubles.  */
+#ifndef NO_HOLES
+# define NO_HOLES 1
+#endif
+
+/* This define will cause callMethodV and callMethodA to promote every
+   integer type to a 64bit word, and every float to double, so that
+   every value can be loaded as a single 64bit word.  It also causes
+   float arguments to be marked as 'D'.  */
+#ifndef PROMOTE_TO_64bits
+# define PROMOTE_TO_64bits 1
+#endif
+ 
+#ifndef PROMOTE_jfloat2jdouble
+# define PROMOTE_jfloat2jdouble 0
+#endif
+
+#if defined(NEED_sysdepCallMethod)
+#include "sysdepCallMethod.h"
+#endif /* defined(NEED_sysdepCallMethod) */
+
+#if defined(__GNUC__)
+#define KAFFE_PROFILER 1
+#endif
+
+#if defined(KAFFE_PROFILER)
+
+/* Profiler clicks counter type.  */
+typedef uint64 profiler_click_t;
+
+/* ReaD the processor Time Stamp Counter.
+ * This is a macro to help GCC optimization.
+ * The rdtsc instruction load TSC to edx:eax aka A register.  */
+#define profiler_get_clicks(COUNTER) \
+        asm volatile ("rdtsc" : "=A" (COUNTER))
+
+#endif
+
+#include "gccbuiltin.h"
+#include "atomic.h"
+#include "katomic.h"
+#include "generic/comparexch.h"
+
+#endif




More information about the kaffe mailing list