summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2008-12-03 20:47:02 -0500
committerKristian Høgsberg <krh@redhat.com>2009-02-06 15:25:49 -0500
commit358c04991e0c0165cf0a5f3d3926a7bade445b7e (patch)
tree83368a763aa8073b71a040d2106a48fc9f0389a5
parent5ecf04743709da0816705d11df85bc2a7c5a4643 (diff)
Fix compilation on x86-64
-rw-r--r--module/sysprof-module.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/module/sysprof-module.c b/module/sysprof-module.c
index 9cd3ff9..77e1e06 100644
--- a/module/sysprof-module.c
+++ b/module/sysprof-module.c
@@ -67,25 +67,27 @@ DECLARE_WAIT_QUEUE_HEAD (wait_for_trace);
DECLARE_WAIT_QUEUE_HEAD (wait_for_exit);
/* Macro the names of the registers that are used on each architecture */
-#if defined(CONFIG_X86_64)
-# define REG_FRAME_PTR rbp
-# define REG_INS_PTR rip
-# define REG_STACK_PTR rsp
-# define REG_STACK_PTR0 rsp0
-#elif defined(CONFIG_X86)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25)
-# define REG_FRAME_PTR bp
-# define REG_INS_PTR ip
-# define REG_STACK_PTR sp
-# define REG_STACK_PTR0 sp0
+#if !defined(CONFIG_X86_64) && !defined(CONFIG_X86)
+# error Sysprof only supports the i386 and x86-64 architectures
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25)
+# define REG_FRAME_PTR bp
+# define REG_INS_PTR ip
+# define REG_STACK_PTR sp
+# define REG_STACK_PTR0 sp0
+#else
+# if defined(CONFIG_X86_64)
+# define REG_FRAME_PTR rbp
+# define REG_INS_PTR rip
+# define REG_STACK_PTR rsp
+# define REG_STACK_PTR0 rsp0
# else
# define REG_FRAME_PTR ebp
# define REG_INS_PTR eip
# define REG_STACK_PTR esp
# define REG_STACK_PTR0 esp0
# endif
-#else
-# error Sysprof only supports the i386 and x86-64 architectures
#endif
typedef struct userspace_reader userspace_reader;