Fix inline asm of VM numerical operations for x32.
authorMark H Weaver <mhw@netris.org>
Wed, 12 Feb 2014 19:28:03 +0000 (14:28 -0500)
committerMark H Weaver <mhw@netris.org>
Thu, 13 Feb 2014 01:53:55 +0000 (20:53 -0500)
* libguile/vm-i-scheme.c (_CX): Choose register size based on
  'SIZEOF_VOID_P' instead of '__x86_64__'.

libguile/vm-i-scheme.c

index fc32ec5..dd2150d 100644 (file)
@@ -236,10 +236,12 @@ VM_DEFINE_FUNCTION (149, ge, "ge?", 2)
 #if SCM_GNUC_PREREQ (4, 5) && (defined __x86_64__ || defined __i386__)
 
 # undef _CX
-# ifdef __x86_64__
+# if SIZEOF_VOID_P == 8
 #  define _CX "rcx"
-# else
+# elif SIZEOF_VOID_P == 4
 #  define _CX "ecx"
+# else
+#  error unsupported word size
 # endif
 
 /* The macros below check the CPU's overflow flag to improve fixnum