patch to fix bug #18443
David Mosberger
davidm@napali.hpl.hp.com
Tue Dec 7 22:49:00 GMT 2004
As requested by Andrew Pinski, I'm forwarding the patch from bugzilla
report 18443. Please apply.
Thanks,
--david
2004-11-15 David Mosberger <davidm@hpl.hp.com>
PR target/18443
* config/ia64/ia64.c (ia64_assemble_integer): Add support for
emitting unaligned pointer-sized integers.
--- gcc-orig/gcc/config/ia64/ia64.c 2004-11-15 11:09:03.809412982 -0800
+++ gcc/gcc/config/ia64/ia64.c 2004-11-15 12:00:16.015430035 -0800
@@ -2736,15 +2736,16 @@
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 *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;
More information about the Gcc-patches
mailing list