aboutsummaryrefslogtreecommitdiff
path: root/gold/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-18 11:09:28 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-01-06 15:38:25 -0800
commit4fc1b9d43cbce7571264a0011c87258b78252750 (patch)
tree93ec540f596de570077e84135d9e1a78ac4b67a4 /gold/configure
parente7287c7f647870093b8ab5ffea0732ffdb8c4d66 (diff)
downloadgdb-4fc1b9d43cbce7571264a0011c87258b78252750.zip
gdb-4fc1b9d43cbce7571264a0011c87258b78252750.tar.gz
gdb-4fc1b9d43cbce7571264a0011c87258b78252750.tar.bz2
Handle stack split for x32
X32 uses cmp %fs:NN,%esp, lea NN(%rsp),%r10d, lea NN(%rsp),%r11d, instead of cmp %fs:NN,%rsp, lea NN(%rsp),%r10, lea NN(%rsp),%r11. This patch handles it. PR gold/17729 * configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32. (DEFAULT_TARGET_X32): Set for x32. * x86_64.cc (cmp_insn_32): New. (lea_r10_insn_32): Likewise. (lea_r11_insn_32): Likewise. (cmp_insn_64): Likewise. (lea_r10_insn_64): Likewise. (lea_r11_insn_64): Likewise. (Target_x86_64<size>::do_calls_non_split): Handle x32. * testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh. (check_DATA): Add split_x32 files. (split_x32_[1234n].o): New targets. (split_x32_[124]): New targets. (split_x32_[1234r].stdout): New targets. * testsuite/split_x32.sh: New file. * testsuite/split_x32_1.s: Likewise. * testsuite/split_x32_2.s: Likewise. * testsuite/split_x32_3.s: Likewise. * testsuite/split_x32_4.s: Likewise. * testsuite/split_x32_n.s: Likewise. * configure: Regenerated. * testsuite/Makefile.in: Likewise.
Diffstat (limited to 'gold/configure')
-rwxr-xr-xgold/configure28
1 files changed, 27 insertions, 1 deletions
diff --git a/gold/configure b/gold/configure
index 7d7b849..23e4735 100755
--- a/gold/configure
+++ b/gold/configure
@@ -688,6 +688,8 @@ DEFAULT_TARGET_MIPS_FALSE
DEFAULT_TARGET_MIPS_TRUE
DEFAULT_TARGET_TILEGX_FALSE
DEFAULT_TARGET_TILEGX_TRUE
+DEFAULT_TARGET_X32_FALSE
+DEFAULT_TARGET_X32_TRUE
DEFAULT_TARGET_X86_64_FALSE
DEFAULT_TARGET_X86_64_TRUE
DEFAULT_TARGET_SPARC_FALSE
@@ -3475,7 +3477,19 @@ else
DEFAULT_TARGET_SPARC_FALSE=
fi
- if test "$targ_obj" = "x86_64"; then
+ target_x86_64=no
+ target_x32=no
+ if test "$targ_obj" = "x86_64"; then
+ case "$target" in
+ x86_64*-linux-gnux32)
+ target_x32=yes
+ ;;
+ *)
+ target_x86_64=yes
+ ;;
+ esac
+ fi
+ if test "$target_x86_64" = "yes"; then
DEFAULT_TARGET_X86_64_TRUE=
DEFAULT_TARGET_X86_64_FALSE='#'
else
@@ -3483,6 +3497,14 @@ else
DEFAULT_TARGET_X86_64_FALSE=
fi
+ if test "$target_x32" = "yes"; then
+ DEFAULT_TARGET_X32_TRUE=
+ DEFAULT_TARGET_X32_FALSE='#'
+else
+ DEFAULT_TARGET_X32_TRUE='#'
+ DEFAULT_TARGET_X32_FALSE=
+fi
+
if test "$targ_obj" = "tilegx"; then
DEFAULT_TARGET_TILEGX_TRUE=
DEFAULT_TARGET_TILEGX_FALSE='#'
@@ -7811,6 +7833,10 @@ if test -z "${DEFAULT_TARGET_X86_64_TRUE}" && test -z "${DEFAULT_TARGET_X86_64_F
as_fn_error "conditional \"DEFAULT_TARGET_X86_64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${DEFAULT_TARGET_X32_TRUE}" && test -z "${DEFAULT_TARGET_X32_FALSE}"; then
+ as_fn_error "conditional \"DEFAULT_TARGET_X32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${DEFAULT_TARGET_TILEGX_TRUE}" && test -z "${DEFAULT_TARGET_TILEGX_FALSE}"; then
as_fn_error "conditional \"DEFAULT_TARGET_TILEGX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5