diff options
author | Alan Modra <amodra@gmail.com> | 2015-04-28 13:17:19 +0930 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2015-04-28 13:17:19 +0930 |
commit | 3954ead0d88676855e877a8a20c05f49256260d7 (patch) | |
tree | a4a4eb35291c72c4e8e3667ec61ef8760b899aa6 /gcc/configure | |
parent | 1a9f259288745633d1cec9991b55c08dfae2669b (diff) | |
download | gcc-3954ead0d88676855e877a8a20c05f49256260d7.zip gcc-3954ead0d88676855e877a8a20c05f49256260d7.tar.gz gcc-3954ead0d88676855e877a8a20c05f49256260d7.tar.bz2 |
re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants)
PR target/65810
* config/rs6000/rs6000.c (POWERPC64_TOC_POINTER_ALIGNMENT): Define.
(offsettable_ok_by_alignment): Use minimum of decl and toc
pointer alignment. Replace dead code with assertion.
(use_toc_relative_ref): Add mode arg. Return false in -mcmodel=medium
case if size exceeds toc pointer alignment.
(rs6000_legitimize_reload_address): Update use_toc_relative_ref call.
(rs6000_emit_move): Likewise.
* configure.ac: Add linker toc pointer alignment check.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r222498
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 9523773..84f58ce 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27531,6 +27531,40 @@ $as_echo "$gcc_cv_ld_large_toc" >&6; } $as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker toc pointer alignment" >&5 +$as_echo_n "checking linker toc pointer alignment... " >&6; } +if test "${gcc_cv_ld_toc_align+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_nm != x; then + cat > conftest.s <<EOF + .global _start + .text +_start: + addis 9,2,x@got@ha + .section .data.rel.ro,"aw",@progbits + .p2align 16 + .space 32768 +x: .quad .TOC. +EOF + if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ + && $gcc_cv_ld $emul_name -o conftest conftest.o > /dev/null 2>&1; then + gcc_cv_ld_toc_align=`$gcc_cv_nm conftest | ${AWK} '/\.TOC\./ { match ($0, "0[[:xdigit:]]*", a); print strtonum ("0x" substr(a[0], length(a[0])-3)) }'` + fi + rm -f conftest conftest.o conftest.s + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_toc_align" >&5 +$as_echo "$gcc_cv_ld_toc_align" >&6; } + if test -n "$gcc_cv_ld_toc_align" && test $gcc_cv_ld_toc_align -gt 8; then + +cat >>confdefs.h <<_ACEOF +#define POWERPC64_TOC_POINTER_ALIGNMENT $gcc_cv_ld_toc_align +_ACEOF + + fi ;; esac |