Index: gcc/config/i386/i386.md
===================================================================
--- gcc/config/i386/i386.md	(revision 201646)
+++ gcc/config/i386/i386.md	(working copy)
@@ -2255,7 +2255,7 @@
   "TARGET_LP64 && ix86_check_movabs (insn, 0)"
   "@
    movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1}
-   mov{<imodesuffix>}\t{%1, %a0|%a0, %1}"
+   mov{<imodesuffix>}\t{%1, %a0|<iptrsize> PTR %a0, %1}"
   [(set_attr "type" "imov")
    (set_attr "modrm" "0,*")
    (set_attr "length_address" "8,0")
@@ -2269,7 +2269,7 @@
   "TARGET_LP64 && ix86_check_movabs (insn, 1)"
   "@
    movabs{<imodesuffix>}\t{%P1, %0|%0, [%P1]}
-   mov{<imodesuffix>}\t{%a1, %0|%0, %a1}"
+   mov{<imodesuffix>}\t{%a1, %0|%0,<iptrsize> PTR %a1}"
   [(set_attr "type" "imov")
    (set_attr "modrm" "0,*")
    (set_attr "length_address" "8,0")
Index: gcc/testsuite/gcc.target/i386/movabs-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/movabs-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/i386/movabs-1.c	(working copy)
@@ -0,0 +1,10 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -masm=intel" } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target masm_intel } */
+
+void
+foo (void)
+{
+  *(volatile long*)0xFFFF800000000000 = -1;
+}
