Message ID | ydd1s84kbce.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
Series | [build] Remove SPARC HAVE_AS_REGISTER_PSEUDO_OP | expand |
On Thu, 1 Nov 2018, Rainer Orth wrote: > * One for ia64 in gcc_cv_as_ia64_ltoffx_ldxmov_relocs) ... > > $as_echo ' .text > addl r15 = @ltoffx(x#), gp > ;; > ld8.mov r16 = [r15], x#'[] > conftest.s Thanks for pointing this out. I've applied this patch to fix this by adding a newline at the end of the test input (which is what I did for all the cases where adding AC_LANG_SOURCE resulted in autoconf errors if the last line of the AC_LANG_SOURCE argument contained '#'; I don't know how related the issues are, but it's at least less cryptic for the reader than using a quadrigraph). Avoid stray [] in ia64 assembler test. Noted in <https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00034.html>. Fix by adding extra newline in test input is analogous to many such newlines added in cases where argument to a newly added AC_LANG_SOURCE had a preprocessor directive on its last line. 2018-11-01 Joseph Myers <joseph@codesourcery.com> * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline at end of assembler input text. * configure: Regenerate. Index: configure =================================================================== --- configure (revision 265722) +++ configure (working copy) @@ -26646,7 +26646,8 @@ $as_echo ' .text addl r15 = @ltoffx(x#), gp ;; - ld8.mov r16 = [r15], x#'[] > conftest.s + ld8.mov r16 = [r15], x# +' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 Index: configure.ac =================================================================== --- configure.ac (revision 265722) +++ configure.ac (working copy) @@ -4550,7 +4550,8 @@ [ .text addl r15 = @ltoffx(x#), gp ;; - ld8.mov r16 = [[r15]], x#],, + ld8.mov r16 = [[r15]], x# +],, [AC_DEFINE(HAVE_AS_LTOFFX_LDXMOV_RELOCS, 1, [Define if your assembler supports ltoffx and ldxmov relocations.])])
> So the current patch removes both the autoconf test and the uses of the > macro. Solaris 11/SPARC Bootstraps with both as and gas currently > running. Ok for mainline if they pass? Sure, thanks for fixing this!
Hi Joseph, > On Thu, 1 Nov 2018, Rainer Orth wrote: > >> * One for ia64 in gcc_cv_as_ia64_ltoffx_ldxmov_relocs) ... >> >> $as_echo ' .text >> addl r15 = @ltoffx(x#), gp >> ;; >> ld8.mov r16 = [r15], x#'[] > conftest.s > > Thanks for pointing this out. I've applied this patch to fix this by > adding a newline at the end of the test input (which is what I did for all > the cases where adding AC_LANG_SOURCE resulted in autoconf errors if the > last line of the AC_LANG_SOURCE argument contained '#'; I don't know how > related the issues are, but it's at least less cryptic for the reader than > using a quadrigraph). very much so, thanks for the hint. I've applied it to my Solaris as SHF_MERGE patch, too. Rainer
# HG changeset patch # Parent 9f1fd4adf7454b08bcb179652a217c48e17cfa08 Remove SPARC HAVE_AS_REGISTER_PSEUDO_OP diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -5583,7 +5583,6 @@ sparc_initial_elimination_offset (int to void sparc_output_scratch_registers (FILE *file ATTRIBUTE_UNUSED) { -#ifdef HAVE_AS_REGISTER_PSEUDO_OP int i; if (TARGET_ARCH32) @@ -5604,7 +5603,6 @@ sparc_output_scratch_registers (FILE *fi } if (i == 3) i = 5; } -#endif } #define PROBE_INTERVAL (1 << STACK_CHECK_PROBE_INTERVAL_EXP) diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -365,11 +365,7 @@ extern enum cmodel sparc_cmodel; This is what GAS uses. Add %(asm_arch) to ASM_SPEC to enable. */ #define ASM_ARCH32_SPEC "-32" -#ifdef HAVE_AS_REGISTER_PSEUDO_OP #define ASM_ARCH64_SPEC "-64 -no-undeclared-regs" -#else -#define ASM_ARCH64_SPEC "-64" -#endif #define ASM_ARCH_DEFAULT_SPEC \ (DEFAULT_ARCH32_P ? ASM_ARCH32_SPEC : ASM_ARCH64_SPEC) @@ -1197,7 +1193,6 @@ init_cumulative_args (& (CUM), (FNTYPE), extern GTY(()) char sparc_hard_reg_printed[8]; -#ifdef HAVE_AS_REGISTER_PSEUDO_OP #define ASM_DECLARE_REGISTER_GLOBAL(FILE, DECL, REGNO, NAME) \ do { \ if (TARGET_ARCH64) \ @@ -1216,8 +1211,6 @@ do { \ } \ } \ } while (0) -#endif - /* Emit rtl for profiling. */ #define PROFILE_HOOK(LABEL) sparc_profile_hook (LABEL) diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4077,11 +4077,6 @@ EOF ;; sparc*-*-*) - gcc_GAS_CHECK_FEATURE([.register], gcc_cv_as_sparc_register_op,,, - [.register %g2, #scratch],, - [AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, - [Define if your assembler supports .register.])]) - gcc_GAS_CHECK_FEATURE([-relax option], gcc_cv_as_sparc_relax,, [-relax], [.text],, [AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,