patches/gcc/3.4.6/190-all_sh-pr16665-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
parent 402 197e1b49586e
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
     1 diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.c gcc-3.4.6/gcc/config/sh/sh.c
     2 --- gcc-3.4.6.orig/gcc/config/sh/sh.c	2004-09-03 08:51:30.000000000 +0200
     3 +++ gcc-3.4.6/gcc/config/sh/sh.c	2007-08-15 23:01:48.000000000 +0200
     4 @@ -9107,6 +9107,15 @@
     5      }
     6    this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
     7  
     8 +  /* In PIC case, we set PIC register to compute the target address.  We
     9 +     can use a scratch register to save and restore the original value  
    10 +     except for SHcompact.  For SHcompact, use stack.  */
    11 +  if (flag_pic && TARGET_SHCOMPACT)
    12 +    {
    13 +      push (PIC_OFFSET_TABLE_REGNUM);
    14 +      emit_insn (gen_GOTaddr2picreg ());
    15 +    }
    16 +
    17    /* For SHcompact, we only have r0 for a scratch register: r1 is the
    18       static chain pointer (even if you can't have nested virtual functions
    19       right now, someone might implement them sometime), and the rest of the
    20 @@ -9189,8 +9198,24 @@
    21        assemble_external (function);
    22        TREE_USED (function) = 1;
    23      }
    24 +  /* We can use scratch1 to save and restore the original value of
    25 +     PIC register except for SHcompact.  */
    26 +  if (flag_pic && ! TARGET_SHCOMPACT)
    27 +    {
    28 +      emit_move_insn (scratch1,
    29 +		      gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
    30 +      emit_insn (gen_GOTaddr2picreg ());
    31 +    }
    32    funexp = XEXP (DECL_RTL (function), 0);
    33    emit_move_insn (scratch2, funexp);
    34 +  if (flag_pic)
    35 +    {
    36 +      if (! TARGET_SHCOMPACT)
    37 +	emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
    38 +			scratch1);
    39 +      else
    40 +	pop (PIC_OFFSET_TABLE_REGNUM);
    41 +    }
    42    funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
    43    sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
    44    SIBLING_CALL_P (sibcall) = 1;