]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/18443 (#pragma pack(1) breaks function pointer initialization)
authorDavid Mosberger <davidm@hpl.hp.com>
Wed, 8 Dec 2004 01:59:28 +0000 (01:59 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 8 Dec 2004 01:59:28 +0000 (17:59 -0800)
        PR target/18443
        * config/ia64/ia64.c (ia64_assemble_integer): Add support for
        emitting unaligned pointer-sized integers.

From-SVN: r91847

gcc/ChangeLog
gcc/config/ia64/ia64.c

index 0b0aaf8a23b6e35d778cf2a2372747e90ff9b842..bd1a39a1fce901288425e343b6662e7f08cbe3e5 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-07  David Mosberger  <davidm@hpl.hp.com>
+
+        PR target/18443
+        * config/ia64/ia64.c (ia64_assemble_integer): Add support for
+        emitting unaligned pointer-sized integers.
+
 2004-12-05  Richard Henderson  <rth@redhat.com>
 
        PR target/18841
index 67fb535fbf0f4599f1adac39bea81afd4389c160..22507f53127a00e1cacfb713cb5594c532690066 100644 (file)
@@ -3021,15 +3021,16 @@ ia64_assemble_integer (x, size, aligned_p)
      int aligned_p;
 {
   if (size == (TARGET_ILP32 ? 4 : 8)
-      && aligned_p
       && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
       && GET_CODE (x) == SYMBOL_REF
       && SYMBOL_REF_FLAG (x))
     {
-      if (TARGET_ILP32)
-       fputs ("\tdata4\t@fptr(", asm_out_file);
-      else
-       fputs ("\tdata8\t@fptr(", asm_out_file);
+      static const char * const directive[2][2] = {
+         /* 64-bit pointer */  /* 32-bit pointer */
+       { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("},  /* unaligned */
+       { "\tdata8\t@fptr(",    "\tdata4\t@fptr("}      /* aligned */
+      };
+      fputs (directive[aligned_p != 0][TARGET_ILP32 != 0], asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")\n", asm_out_file);
       return true;