diff options
author | David Mosberger <davidm@hpl.hp.com> | 2004-12-08 00:20:49 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-12-07 16:20:49 -0800 |
commit | 1b79dc38ddc47991e1b111a238162c9f1a5282a8 (patch) | |
tree | f116e6f00b72cbdef1fdada4d3db3fcb1b8aad60 /gcc/config/ia64 | |
parent | 9492747a48ed3a59798781f8aaacb446f1bace5e (diff) | |
download | gcc-1b79dc38ddc47991e1b111a238162c9f1a5282a8.tar.gz |
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
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r-- | gcc/config/ia64/ia64.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index a8fdec4385f..1c80ed1d41d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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; |