From ea24f9f4aadb56c92b92db3679dcc6a50041ed4e Mon Sep 17 00:00:00 2001 From: danglin Date: Sat, 10 Mar 2007 01:34:23 +0000 Subject: [PATCH] * pa.c (attr_length_call): Revise condition for long pc-relative branch. (output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local calls on the SOM target. Don't use "LONG_PIC_PCREL" call sequence on SOM target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122784 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/pa/pa.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea4a8d8b1925..7e7e061146a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-03-09 John David Anglin + + * pa.c (attr_length_call): Revise condition for long pc-relative branch. + (output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local + calls on the SOM target. Don't use "LONG_PIC_PCREL" call sequence on + SOM target. + 2007-03-09 Geoffrey Keating * gcc.c: Document %{, in big comment at top. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e39ddc79a325..c69652020cbd 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -7273,9 +7273,10 @@ attr_length_call (rtx insn, int sibcall) length += 12; /* long pc-relative branch sequence. */ - else if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) + else if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) || (TARGET_64BIT && !TARGET_GAS) - || (TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call))) + || (TARGET_GAS && !TARGET_SOM + && (TARGET_LONG_PIC_PCREL_CALL || local_call))) { length += 20; @@ -7385,8 +7386,9 @@ output_call (rtx insn, rtx call_dest, int sibcall) of increasing length and complexity. In most cases, they don't allow an instruction in the delay slot. */ if (!((TARGET_LONG_ABS_CALL || local_call) && !flag_pic) - && !(TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) - && !(TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call)) + && !(TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) + && !(TARGET_GAS && !TARGET_SOM + && (TARGET_LONG_PIC_PCREL_CALL || local_call)) && !TARGET_64BIT) indirect_call = 1; @@ -7432,7 +7434,7 @@ output_call (rtx insn, rtx call_dest, int sibcall) } else { - if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) + if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) || (TARGET_64BIT && !TARGET_GAS)) { /* The HP assembler and linker can handle relocations @@ -7446,7 +7448,8 @@ output_call (rtx insn, rtx call_dest, int sibcall) CODE_LABEL_NUMBER (xoperands[1])); output_asm_insn ("ldo R'%0-%l1(%%r1),%%r1", xoperands); } - else if (TARGET_GAS && (TARGET_LONG_PIC_PCREL_CALL || local_call)) + else if (TARGET_GAS && !TARGET_SOM + && (TARGET_LONG_PIC_PCREL_CALL || local_call)) { /* GAS currently can't generate the relocations that are needed for the SOM linker under HP-UX using this -- 2.47.3