Commit 1b79dc38 by David Mosberger Committed by Richard Henderson

re PR target/18443 (#pragma pack(1) breaks function pointer initialization)

        PR target/18443
        * config/ia64/ia64.c (ia64_assemble_integer): Add support for
        emitting unaligned pointer-sized integers.

From-SVN: r91842
parent 9492747a
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> 2004-12-07 Steven Bosscher <stevenb@suse.de>
PR c/18867 PR c/18867
......
...@@ -2736,15 +2736,16 @@ static bool ...@@ -2736,15 +2736,16 @@ static bool
ia64_assemble_integer (rtx x, unsigned int size, int aligned_p) ia64_assemble_integer (rtx x, unsigned int size, int aligned_p)
{ {
if (size == POINTER_SIZE / BITS_PER_UNIT if (size == POINTER_SIZE / BITS_PER_UNIT
&& aligned_p
&& !(TARGET_NO_PIC || TARGET_AUTO_PIC) && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
&& GET_CODE (x) == SYMBOL_REF && GET_CODE (x) == SYMBOL_REF
&& SYMBOL_REF_FUNCTION_P (x)) && SYMBOL_REF_FUNCTION_P (x))
{ {
if (POINTER_SIZE == 32) static const char * const directive[2][2] = {
fputs ("\tdata4\t@fptr(", asm_out_file); /* 64-bit pointer */ /* 32-bit pointer */
else { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("}, /* unaligned */
fputs ("\tdata8\t@fptr(", asm_out_file); { "\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); output_addr_const (asm_out_file, x);
fputs (")\n", asm_out_file); fputs (")\n", asm_out_file);
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment