diff --git a/cbits/cpuid-pic-i386.c b/cbits/cpuid-pic-i386.c
new file mode 100644
--- /dev/null
+++ b/cbits/cpuid-pic-i386.c
@@ -0,0 +1,15 @@
+// http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inlin
+#include <stdint.h>
+
+void
+cpuid_array(uint32_t op, uint32_t reg[4])
+{
+  asm volatile(
+    "pushl %%ebx      \n" /* save %ebx */
+    "cpuid            \n"
+    "movl %%ebx, %1   \n" /* save what cpuid just put in %ebx */
+    "popl %%ebx       \n" /* restore the old %ebx */
+    : "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]), "=d"(reg[3])
+    : "a"(op)
+    : "cc");
+}
diff --git a/cbits/cpuid-pic-x86_64.c b/cbits/cpuid-pic-x86_64.c
new file mode 100644
--- /dev/null
+++ b/cbits/cpuid-pic-x86_64.c
@@ -0,0 +1,16 @@
+// http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inlin
+// http://stackoverflow.com/questions/6268745/invalid-instruction-suffix-for-push-when-assembling-with-gas
+#include <stdint.h>
+
+void
+cpuid_array(uint32_t op, uint32_t reg[4])
+{
+  asm volatile(
+    "pushq %%rbx      \n" /* save %ebx */
+    "cpuid            \n"
+    "movl %%ebx, %1   \n" /* save what cpuid just put in %ebx */
+    "popq %%rbx       \n" /* restore the old %ebx */
+    : "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]), "=d"(reg[3])
+    : "a"(op)
+    : "cc");
+}
diff --git a/cbits/cpuid-pic.c b/cbits/cpuid-pic.c
deleted file mode 100644
--- a/cbits/cpuid-pic.c
+++ /dev/null
@@ -1,15 +0,0 @@
-// http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inlin
-#include <stdint.h>
-
-void
-cpuid_array(uint32_t op, uint32_t reg[4])
-{
-  asm volatile(
-    "pushl %%ebx      \n" /* save %ebx */
-    "cpuid            \n"
-    "movl %%ebx, %1   \n" /* save what cpuid just put in %ebx */
-    "popl %%ebx       \n" /* restore the old %ebx */
-    : "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]), "=d"(reg[3])
-    : "a"(op)
-    : "cc");
-}
diff --git a/cbits/cpuid.c b/cbits/cpuid.c
--- a/cbits/cpuid.c
+++ b/cbits/cpuid.c
@@ -1,5 +1,13 @@
+/*
+gcc shows its symbols when running:
+echo | gcc -E -dM -
+*/
 #ifdef __PIC__
-#include "cpuid-pic.c"
+#ifdef __x86_64__
+#include "cpuid-pic-x86_64.c"
+#else
+#include "cpuid-pic-i386.c"
+#endif
 #else
 #include "cpuid-pdc.c"
 #endif
diff --git a/cpuid.cabal b/cpuid.cabal
--- a/cpuid.cabal
+++ b/cpuid.cabal
@@ -1,5 +1,5 @@
 Name:               cpuid
-Version:            0.2.2.1
+Version:            0.2.2.2
 License:            GPL
 License-file:       COPYING
 Author:             Martin Grabmueller <martin@grabmueller.de>
@@ -19,7 +19,8 @@
 
 Extra-source-files:
   README
-  cbits/cpuid-pic.c
+  cbits/cpuid-pic-i386.c
+  cbits/cpuid-pic-x86_64.c
   cbits/cpuid-pdc.c
 
 Flag buildExamples
@@ -31,12 +32,13 @@
   Location:    http://code.haskell.org/cpuid/
 
 Library
-  If !arch(i386)
+  If arch(i386) || arch(x86_64)
+    Build-depends:
+      data-accessor >=0.2.2 && <0.3,
+      enumset >=0.0.3 && <0.1,
+      base >=4 && < 5
+  Else
     Buildable: False
-  Build-depends:
-    data-accessor >=0.2.2 && <0.3,
-    enumset >=0.0.3 && <0.1,
-    base >=4 && < 5
   Exposed-Modules:    System.Cpuid
   Extensions:         ForeignFunctionInterface
   C-sources:          cbits/cpuid.c
