|
From: <sv...@va...> - 2005-05-02 10:26:03
|
Author: sewardj
Date: 2005-05-02 11:25:34 +0100 (Mon, 02 May 2005)
New Revision: 3590
Modified:
trunk/Makefile.core-AM_CPPFLAGS.am
trunk/coregrind/Makefile.am
trunk/include/basic_types.h
Log:
Add macro definitions that make it possible to do cpu/os/both
ifdeffery in a sane way where it's absolutely unavoidable. When
building the core, eg on amd64-linux, the following preprocessor
symbols are defined:
VGA_amd64
VGO_linux
VGP_amd64_linux
etc on other platforms.
Also, include/basic_types.h now defines VG_WORDSIZE and this is what
should be used for ifdefs that need to know the host word size.
ifdefs based on the C compilers built-ins such as __amd64__ etc
are deprecated and will be done away with.
Modified: trunk/Makefile.core-AM_CPPFLAGS.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/Makefile.core-AM_CPPFLAGS.am 2005-05-02 09:43:44 UTC (rev 3589)
+++ trunk/Makefile.core-AM_CPPFLAGS.am 2005-05-02 10:25:34 UTC (rev 3590)
@@ -8,7 +8,10 @@
-I$(top_srcdir)/include/$(VG_ARCH) \
-I$(top_srcdir)/include/$(VG_OS) \
-I$(top_srcdir)/include/$(VG_PLATFORM) \
- -I@VEX_DIR@/pub
+ -I@VEX_DIR@/pub \
+ -DVGA_$(VG_ARCH)=3D1 \
+ -DVGO_$(VG_OS)=3D1 \
+ -DVGP_$(VG_ARCH)_$(VG_OS)=3D1
=20
AM_CPPFLAGS =3D $(add_includes)
AM_CCASFLAGS =3D $(add_includes) @ARCH_CORE_AM_CCASFLAGS@ -Wa,-gstabs
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-05-02 09:43:44 UTC (rev 3589)
+++ trunk/coregrind/Makefile.am 2005-05-02 10:25:34 UTC (rev 3590)
@@ -13,8 +13,8 @@
m_sigframe m_aspacemgr demangle .
=20
AM_CPPFLAGS +=3D -DVG_LIBDIR=3D"\"$(valdir)"\" -I$(srcdir)/demangle \
- -DKICKSTART_BASE=3D@KICKSTART_BASE@ \
- -DVG_PLATFORM=3D"$(VG_PLATFORM)"
+ -DKICKSTART_BASE=3D@KICKSTART_BASE@
+
AM_CFLAGS =3D $(WERROR) -Wmissing-prototypes -Winline -Wall -Wshadow -O =
-g @ARCH_CORE_AM_CFLAGS@
AM_CFLAGS +=3D -fno-omit-frame-pointer
=20
Modified: trunk/include/basic_types.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/basic_types.h 2005-05-02 09:43:44 UTC (rev 3589)
+++ trunk/include/basic_types.h 2005-05-02 10:25:34 UTC (rev 3590)
@@ -57,6 +57,11 @@
=20
typedef Word OffT; // 32 64
=20
+
+/* This is going to be either 4 or 8. */
+#define VG_WORDSIZE VEX_HOST_WORDSIZE
+
+
/* ---------------------------------------------------------------------
non-builtin types
------------------------------------------------------------------ */
|