diff mbox

[x32] PATCH: PR target/47446: [x32] .quad instead of .long is used for address

Message ID 20110125220901.GA19303@intel.com
State New
Headers show

Commit Message

H.J. Lu Jan. 25, 2011, 10:09 p.m. UTC
On Mon, Jan 24, 2011 at 01:08:53PM -0800, H.J. Lu wrote:
> Hi,
> 
> I checked this patch into x32 branch.
> 
> H.J.
> ---
> commit e9a73ee31b8b78d42edf177690054c2cac8ddf33
> Author: H.J. Lu <hjl.tools@gmail.com>
> Date:   Mon Jan 24 13:06:15 2011 -0800
> 
>     Check TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD.
> 
> diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
> index fb3e3e0..ebe1d13 100644
> --- a/gcc/ChangeLog.x32
> +++ b/gcc/ChangeLog.x32
> @@ -1,3 +1,10 @@
> +2011-01-24  H.J. Lu  <hongjiu.lu@intel.com>
> +
> +	PR target/47446
> +	* config/i386/i386.c (ix86_output_addr_vec_elt): Check
> +	TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD.
> +	(ix86_output_addr_diff_elt): Likewise.
> +
>    /* We can't use @GOTOFF for text labels on VxWorks; see gotoff_operand.  */
> -  if (TARGET_64BIT || TARGET_VXWORKS_RTP)
> +  if (TARGET_LP64 || TARGET_VXWORKS_RTP)
>      fprintf (file, "%s%s%d-%s%d\n",
>  	     directive, LPREFIX, value, LPREFIX, rel);
>    else if (HAVE_AS_GOTOFF_IN_DATA)

This change is wrong.  I checked in this patch to revert it.


H.J.
--
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 25 14:04:06 2011 -0800

    Put back the last TARGET_64BIT check in ix86_output_addr_diff_elt.
diff mbox

Patch

diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index 6612b40..5e805c0 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,5 +1,11 @@ 
 2011-01-25  H.J. Lu  <hongjiu.lu@intel.com>
 
+	PR target/47446
+	* config/i386/i386.c (ix86_output_addr_diff_elt): Put back the
+	last TARGET_64BIT check.
+
+2011-01-25  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR middle-end/47449
 	* fwprop.c (forward_propagate_subreg): Don't propagate hard
 	register.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 957fc2a..8e652b8 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15217,7 +15217,7 @@  ix86_output_addr_diff_elt (FILE *file, int value, int rel)
   gcc_assert (!TARGET_64BIT);
 #endif
   /* We can't use @GOTOFF for text labels on VxWorks; see gotoff_operand.  */
-  if (TARGET_LP64 || TARGET_VXWORKS_RTP)
+  if (TARGET_64BIT || TARGET_VXWORKS_RTP)
     fprintf (file, "%s%s%d-%s%d\n",
 	     directive, LPREFIX, value, LPREFIX, rel);
   else if (HAVE_AS_GOTOFF_IN_DATA)
diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32
index 271a2ae..597294e 100644
--- a/gcc/testsuite/ChangeLog.x32
+++ b/gcc/testsuite/ChangeLog.x32
@@ -1,3 +1,8 @@ 
+2011-01-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR target/47446
+	* gcc.target/i386/pr47446-2.c: New.
+
 2011-01-24  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR middle-end/47449
diff --git a/gcc/testsuite/gcc.target/i386/pr47446-2.c b/gcc/testsuite/gcc.target/i386/pr47446-2.c
new file mode 100644
index 0000000..5410c7f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr47446-2.c
@@ -0,0 +1,41 @@ 
+/* { dg-do assemble } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void abort (void);
+enum
+{
+  __GCONV_OK = 0,
+  __GCONV_NOCONV,
+  __GCONV_NODB,
+  __GCONV_NOMEM,
+  __GCONV_EMPTY_INPUT,
+  __GCONV_FULL_OUTPUT,
+  __GCONV_ILLEGAL_INPUT,
+  __GCONV_INCOMPLETE_INPUT,
+  __GCONV_ILLEGAL_DESCRIPTOR,
+  __GCONV_INTERNAL_ERROR
+};
+int
+foo (int result)
+{
+  int irreversible = 0;
+  switch (result)
+    {
+    case __GCONV_ILLEGAL_INPUT:
+      irreversible = -1L;
+      break;
+    case __GCONV_FULL_OUTPUT:
+      irreversible = -2L;
+      break;
+    case __GCONV_INCOMPLETE_INPUT:
+      irreversible = -3L;
+      break;
+    case __GCONV_EMPTY_INPUT:
+    case __GCONV_OK:
+      break;
+    default:
+      abort ();
+    }
+  return irreversible;
+}