OSDN Git Service

PR target/18443
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2004 00:20:49 +0000 (00:20 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2004 00:20:49 +0000 (00:20 +0000)
        * config/ia64/ia64.c (ia64_assemble_integer): Add support for
        emitting unaligned pointer-sized integers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91842 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 70747e2..c560ba1 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-07  Steven Bosscher  <stevenb@suse.de>
 
        PR c/18867
index a8fdec4..1c80ed1 100644 (file)
@@ -2736,15 +2736,16 @@ static bool
 ia64_assemble_integer (rtx x, unsigned int size, int aligned_p)
 {
   if (size == POINTER_SIZE / BITS_PER_UNIT
-      && aligned_p
       && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
       && GET_CODE (x) == SYMBOL_REF
       && SYMBOL_REF_FUNCTION_P (x))
     {
-      if (POINTER_SIZE == 32)
-       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)][POINTER_SIZE == 32], asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")\n", asm_out_file);
       return true;