From: Trevor Saunders <tbsaunde+...@tbsaunde.org> Hi,
basically just $subject, always define HAVE_AS_LEB128, and then use if / else instead of #ifdef. Note the diff has a bit of whitespace noise, so there's a -w diff below the full one. bootstrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: 2016-08-20 Trevor Saunders <tbsaunde+...@tbsaunde.org> * acinclude.m4 (gcc_GAS_CHECK_FEATURE): Support doing an action if the feature isn't available. * configure: Regenerate. * configure.ac: define HAVE_AS_LEB128 to 0 when not available. * dwarf2asm.c (dw2_asm_output_data_uleb128): Always compile code for HAVE_AS_LEB128. (dw2_asm_output_data_sleb128): Likewise. (dw2_asm_output_delta_uleb128): Likewise. (dw2_asm_output_delta_sleb128): Likewise. * except.c (output_one_function_exception_table): Likewise. (dw2_size_of_call_site_table): Likewise. (sjlj_size_of_call_site_table): Likewise. --- gcc/acinclude.m4 | 4 ++ gcc/configure | 106 +++++++++++++++++++++++++++++++- gcc/configure.ac | 2 + gcc/dwarf2asm.c | 184 +++++++++++++++++++++++++++---------------------------- gcc/except.c | 162 ++++++++++++++++++++++++------------------------ 5 files changed, 283 insertions(+), 175 deletions(-) diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 index 38dd899..791f2a7 100644 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -550,6 +550,10 @@ AC_CACHE_CHECK([assembler for $1], [$2], ifelse([$7],,,[dnl if test $[$2] = yes; then $7 +fi]) +ifelse([$8],,,[dnl +if test $[$2] != yes; then + $8 fi])]) dnl gcc_SUN_LD_VERSION diff --git a/gcc/configure b/gcc/configure index 871ed0c..e286123 100755 --- a/gcc/configure +++ b/gcc/configure @@ -22485,6 +22485,7 @@ $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5 $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; } if test "${gcc_cv_as_max_skip_p2align+set}" = set; then : @@ -22520,6 +22521,7 @@ $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5 $as_echo_n "checking assembler for .literal16... " >&6; } if test "${gcc_cv_as_literal16+set}" = set; then : @@ -22555,6 +22557,7 @@ $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5 $as_echo_n "checking assembler for working .subsection -1... " >&6; } if test "${gcc_cv_as_subsection_m1+set}" = set; then : @@ -22602,6 +22605,7 @@ $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5 $as_echo_n "checking assembler for .weak... " >&6; } if test "${gcc_cv_as_weak+set}" = set; then : @@ -22637,6 +22641,7 @@ $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5 $as_echo_n "checking assembler for .weakref... " >&6; } if test "${gcc_cv_as_weakref+set}" = set; then : @@ -22672,6 +22677,7 @@ $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5 $as_echo_n "checking assembler for .nsubspa comdat... " >&6; } if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then : @@ -22708,6 +22714,7 @@ $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h fi + # .hidden needs to be supported in both the assembler and the linker, # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for; we have to check the @@ -22747,6 +22754,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5 $as_echo "$gcc_cv_as_hidden" >&6; } + case "${target}" in *-*-darwin*) # Darwin as has some visibility support, though with a different syntax. @@ -23199,6 +23207,11 @@ if test $gcc_cv_as_leb128 = yes; then $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h fi +if test $gcc_cv_as_leb128 != yes; then + +$as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h + +fi # Check if we have assembler support for unwind directives. { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5 @@ -23278,6 +23291,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5 $as_echo "$gcc_cv_as_cfi_directive" >&6; } + if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5 $as_echo_n "checking assembler for working cfi advance... " >&6; } @@ -23315,6 +23329,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5 $as_echo "$gcc_cv_as_cfi_advance_working" >&6; } + else # no objdump, err on the side of caution gcc_cv_as_cfi_advance_working=no @@ -23358,6 +23373,7 @@ fi $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes; then echo 1; else echo 0; fi` @@ -23410,6 +23426,7 @@ $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes; then echo 1; else echo 0; fi` @@ -23513,6 +23530,7 @@ fi $as_echo "$gcc_cv_as_eh_frame" >&6; } + if test $gcc_cv_as_eh_frame = buggy; then $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h @@ -23550,6 +23568,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 $as_echo "$gcc_cv_as_shf_merge" >&6; } + if test $gcc_cv_as_shf_merge = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 $as_echo_n "checking assembler for section merging support... " >&6; } @@ -23582,6 +23601,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 $as_echo "$gcc_cv_as_shf_merge" >&6; } + fi cat >>confdefs.h <<_ACEOF @@ -23620,6 +23640,7 @@ $as_echo "#define HAVE_AS_STABS_DIRECTIVE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support (GNU as)" >&5 $as_echo_n "checking assembler for COMDAT group support (GNU as)... " >&6; } if test "${gcc_cv_as_comdat_group+set}" = set; then : @@ -23651,6 +23672,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5 $as_echo "$gcc_cv_as_comdat_group" >&6; } + if test $gcc_cv_as_comdat_group = yes; then gcc_cv_as_comdat_group_percent=no gcc_cv_as_comdat_group_group=no @@ -23686,6 +23708,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5 $as_echo "$gcc_cv_as_comdat_group_percent" >&6; } + if test $gcc_cv_as_comdat_group_percent = yes; then gcc_cv_as_comdat_group_group=no else @@ -23736,6 +23759,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_group" >&5 $as_echo "$gcc_cv_as_comdat_group_group" >&6; } + ;; esac if test -z "${gcc_cv_as_comdat_group_group+set}"; then @@ -23843,6 +23867,7 @@ $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h fi + # Thread-local storage - the check is heavily parameterized. conftest_s= tls_first_major= @@ -24340,6 +24365,7 @@ $as_echo "$gcc_cv_as_tls" >&6; } if test $gcc_cv_as_tls = yes; then set_have_as_tls=yes fi + fi if test $set_have_as_tls = yes ; then @@ -24513,6 +24539,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aarch64_mabi" >&5 $as_echo "$gcc_cv_as_aarch64_mabi" >&6; } + if test x$gcc_cv_as_aarch64_mabi = xyes; then $as_echo "#define HAVE_AS_MABI_OPTION 1" >>confdefs.h @@ -24572,6 +24599,7 @@ if test $gcc_cv_as_aarch64_picreloc = yes; then $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h fi + # Enable default workaround for AArch64 Cortex-A53 erratum 835769. # Check whether --enable-fix-cortex-a53-835769 was given. if test "${enable_fix_cortex_a53_835769+set}" = set; then : @@ -24660,6 +24688,7 @@ if test $gcc_cv_as_alpha_explicit_relocs = yes; then $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5 $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; } if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then : @@ -24697,6 +24726,7 @@ if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h fi + ;; avr-*-*) @@ -24731,6 +24761,7 @@ $as_echo "#define HAVE_AS_AVR_MLINK_RELAX_OPTION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mrmw option" >&5 $as_echo_n "checking assembler for -mrmw option... " >&6; } if test "${gcc_cv_as_avr_mrmw+set}" = set; then : @@ -24761,6 +24792,7 @@ if test $gcc_cv_as_avr_mrmw = yes; then $as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h fi + ;; cris-*-*) @@ -24798,6 +24830,7 @@ if test $gcc_cv_as_cris_no_mul_bug = yes; then $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h fi + ;; sparc*-*-*) @@ -24832,6 +24865,7 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5 $as_echo_n "checking assembler for -relax option... " >&6; } if test "${gcc_cv_as_sparc_relax+set}" = set; then : @@ -24863,6 +24897,7 @@ $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5 $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; } if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then : @@ -24912,6 +24947,7 @@ $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5 $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; } if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then : @@ -25002,7 +25038,9 @@ $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h fi -fi # unaligned pcrel relocs + +fi + # unaligned pcrel relocs { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5 $as_echo_n "checking assembler for offsetable %lo()... " >&6; } @@ -25041,6 +25079,7 @@ $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for FMAF, HPC, and VIS 3.0 instructions" >&5 $as_echo_n "checking assembler for FMAF, HPC, and VIS 3.0 instructions... " >&6; } if test "${gcc_cv_as_sparc_fmaf+set}" = set; then : @@ -25079,6 +25118,7 @@ $as_echo "#define HAVE_AS_FMAF_HPC_VIS3 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC4 instructions" >&5 $as_echo_n "checking assembler for SPARC4 instructions... " >&6; } if test "${gcc_cv_as_sparc_sparc4+set}" = set; then : @@ -25121,6 +25161,7 @@ $as_echo "#define HAVE_AS_SPARC4 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC5 and VIS 4.0 instructions" >&5 $as_echo_n "checking assembler for SPARC5 and VIS 4.0 instructions... " >&6; } if test "${gcc_cv_as_sparc_sparc5+set}" = set; then : @@ -25157,6 +25198,7 @@ $as_echo "#define HAVE_AS_SPARC5_VIS4 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5 $as_echo_n "checking assembler for LEON instructions... " >&6; } if test "${gcc_cv_as_sparc_leon+set}" = set; then : @@ -25193,6 +25235,7 @@ if test $gcc_cv_as_sparc_leon = yes; then $as_echo "#define HAVE_AS_LEON 1" >>confdefs.h fi + ;; i[34567]86-*-* | x86_64-*-*) @@ -25258,6 +25301,7 @@ fi $as_echo "$gcc_cv_as_comm_has_align" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25304,6 +25348,7 @@ if test $gcc_cv_as_ix86_pe_secrel32 = yes; then $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h fi + # Test if the assembler supports the extended form of the .section # directive that specifies section alignment. LTO support uses this, # but normally only after installation, so we warn but don't fail the @@ -25338,6 +25383,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5 $as_echo "$gcc_cv_as_section_has_align" >&6; } + if test x$gcc_cv_as_section_has_align != xyes; then case ",$enable_languages," in *,lto,*) @@ -25383,6 +25429,7 @@ fi $as_echo "$gcc_cv_as_section_has_e" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25419,6 +25466,7 @@ $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5 $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; } if test "${gcc_cv_as_ix86_fildq+set}" = set; then : @@ -25450,6 +25498,7 @@ $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5 $as_echo_n "checking assembler for cmov syntax... " >&6; } if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then : @@ -25481,6 +25530,7 @@ $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5 $as_echo_n "checking assembler for ffreep mnemonic... " >&6; } if test "${gcc_cv_as_ix86_ffreep+set}" = set; then : @@ -25512,6 +25562,7 @@ $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5 $as_echo_n "checking assembler for .quad directive... " >&6; } if test "${gcc_cv_as_ix86_quad+set}" = set; then : @@ -25543,6 +25594,7 @@ $as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5 $as_echo_n "checking assembler for sahf mnemonic... " >&6; } if test "${gcc_cv_as_ix86_sahf+set}" = set; then : @@ -25575,6 +25627,7 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for interunit movq mnemonic" >&5 $as_echo_n "checking assembler for interunit movq mnemonic... " >&6; } if test "${gcc_cv_as_ix86_interunit_movq+set}" = set; then : @@ -25604,6 +25657,7 @@ fi $as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_INTERUNIT_MOVQ `if test $gcc_cv_as_ix86_interunit_movq = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25640,6 +25694,7 @@ $as_echo "#define HAVE_AS_IX86_HLE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5 $as_echo_n "checking assembler for swap suffix... " >&6; } if test "${gcc_cv_as_ix86_swap+set}" = set; then : @@ -25671,6 +25726,7 @@ $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5 $as_echo_n "checking assembler for different section symbol subtraction... " >&6; } if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then : @@ -25708,6 +25764,7 @@ $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5 $as_echo_n "checking assembler for rep and lock prefix... " >&6; } if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then : @@ -25745,6 +25802,7 @@ $as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ud2 mnemonic" >&5 $as_echo_n "checking assembler for ud2 mnemonic... " >&6; } if test "${gcc_cv_as_ix86_ud2+set}" = set; then : @@ -25776,6 +25834,7 @@ $as_echo "#define HAVE_AS_IX86_UD2 1" >>confdefs.h fi + # Enforce 32-bit output with gas and gld. if test x$gas = xyes; then as_ix86_gas_32_opt="--32" @@ -25823,6 +25882,7 @@ $as_echo "#define HAVE_AS_IX86_TLSGDPLT 1" >>confdefs.h fi + conftest_s=' .section .tdata,"aw'$tls_section_flag'",@progbits tls_ld: @@ -25860,6 +25920,7 @@ fi $as_echo "$gcc_cv_as_ix86_tlsldmplt" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLSLDMPLT `if test $gcc_cv_as_ix86_tlsldmplt = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25910,6 +25971,7 @@ fi $as_echo "$gcc_cv_as_ix86_tlsldm" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLSLDM `if test $gcc_cv_as_ix86_tlsldm = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25963,6 +26025,7 @@ fi $as_echo "$gcc_cv_as_ix86_got32x" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_GOT32X `if test x"$gcc_cv_as_ix86_got32x" = xyes; then echo 1; else echo 0; fi` _ACEOF @@ -26003,6 +26066,7 @@ fi $as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` _ACEOF @@ -26057,6 +26121,7 @@ fi $as_echo "$gcc_cv_as_ix86_tls_get_addr_via_got" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLS_GET_ADDR_GOT `if test x"$gcc_cv_as_ix86_tls_get_addr_via_got" = xyes; then echo 1; else echo 0; fi` _ACEOF @@ -26102,6 +26167,7 @@ $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h fi + ;; powerpc*-*-*) @@ -26134,6 +26200,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5 $as_echo "$gcc_cv_as_machine_directive" >&6; } + if test x$gcc_cv_as_machine_directive != xyes; then echo "*** This target requires an assembler supporting \".machine\"" >&2 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 @@ -26188,6 +26255,7 @@ $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr5" .csect .text[PR] @@ -26232,6 +26300,7 @@ $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr5x" .csect .text[PR] @@ -26276,6 +26345,7 @@ $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26320,6 +26390,7 @@ $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .csect .text[PR] LCF..0: @@ -26368,6 +26439,7 @@ $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26412,6 +26484,7 @@ $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26456,6 +26529,7 @@ $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr7" .csect .text[PR] @@ -26500,6 +26574,7 @@ $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr7" .csect .text[PR] @@ -26544,6 +26619,7 @@ $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr8" .csect .text[PR]';; @@ -26586,6 +26662,7 @@ $as_echo "#define HAVE_AS_POWER8 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr9" .csect .text[PR]';; @@ -26628,6 +26705,7 @@ $as_echo "#define HAVE_AS_POWER9 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .csect .text[PR] lwsync';; @@ -26670,6 +26748,7 @@ $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "476" .csect .text[PR] @@ -26714,6 +26793,7 @@ $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then : @@ -26749,6 +26829,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5 $as_echo_n "checking assembler for tls marker support... " >&6; } if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then : @@ -26784,6 +26865,7 @@ $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for prologue entry point marker support" >&5 $as_echo_n "checking assembler for prologue entry point marker support... " >&6; } if test "${gcc_cv_as_powerpc_entry_markers+set}" = set; then : @@ -26819,6 +26901,7 @@ $as_echo "#define HAVE_AS_ENTRY_MARKERS 1" >>confdefs.h fi + case $target in *-*-aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX .ref support" >&5 @@ -26861,6 +26944,7 @@ $as_echo "#define HAVE_AS_REF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX DWARF location lists section support" >&5 $as_echo_n "checking assembler for AIX DWARF location lists section support... " >&6; } if test "${gcc_cv_as_aix_dwloc+set}" = set; then : @@ -26898,6 +26982,7 @@ if test $gcc_cv_as_aix_dwloc = yes; then $as_echo "#define HAVE_XCOFF_DWARF_EXTRAS 1" >>confdefs.h fi + ;; esac ;; @@ -26939,6 +27024,7 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5 $as_echo_n "checking assembler for -mno-shared support... " >&6; } if test "${gcc_cv_as_mips_no_shared+set}" = set; then : @@ -26974,6 +27060,7 @@ $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then : @@ -27009,6 +27096,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .module support" >&5 $as_echo_n "checking assembler for .module support... " >&6; } if test "${gcc_cv_as_mips_dot_module+set}" = set; then : @@ -27040,6 +27128,7 @@ if test $gcc_cv_as_mips_dot_module = yes; then $as_echo "#define HAVE_AS_DOT_MODULE 1" >>confdefs.h fi + if test x$gcc_cv_as_mips_dot_module = xno \ && test x$with_fp_32 != x; then as_fn_error "Requesting --with-fp-32= requires assembler support for .module." "$LINENO" 5 @@ -27076,6 +27165,7 @@ $as_echo "#define HAVE_GAS_MICROMIPS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5 $as_echo_n "checking assembler for .dtprelword support... " >&6; } if test "${gcc_cv_as_mips_dtprelword+set}" = set; then : @@ -27115,6 +27205,7 @@ $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for DSPR1 mult with four accumulators support" >&5 $as_echo_n "checking assembler for DSPR1 mult with four accumulators support... " >&6; } if test "${gcc_cv_as_mips_dspr1_mult+set}" = set; then : @@ -27154,6 +27245,7 @@ $as_echo "#define HAVE_AS_DSPR1_MULT 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5 $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; } gcc_cv_as_ld_jalr_reloc=no @@ -27273,6 +27365,7 @@ if test $gcc_cv_as_mips_nan = yes; then $as_echo "#define HAVE_AS_NAN 1" >>confdefs.h fi + if test x$gcc_cv_as_mips_nan = xno \ && test x$with_nan != x; then as_fn_error "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5 @@ -27313,6 +27406,7 @@ if test $gcc_cv_as_s390_gnu_attribute = yes; then $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine and .machinemode support" >&5 $as_echo_n "checking assembler for .machine and .machinemode support... " >&6; } if test "${gcc_cv_as_s390_machine_machinemode+set}" = set; then : @@ -27350,6 +27444,7 @@ if test $gcc_cv_as_s390_machine_machinemode = yes; then $as_echo "#define HAVE_AS_MACHINE_MACHINEMODE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for architecture modifiers support" >&5 $as_echo_n "checking assembler for architecture modifiers support... " >&6; } if test "${gcc_cv_as_s390_architecture_modifiers+set}" = set; then : @@ -27384,6 +27479,7 @@ if test $gcc_cv_as_s390_architecture_modifiers = yes; then $as_echo "#define HAVE_AS_ARCHITECTURE_MODIFIERS 1" >>confdefs.h fi + ;; esac @@ -27464,6 +27560,7 @@ fi $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; } + # The .debug_line file table must be in the exact order that # we specified the files, since these indices are also used # by DW_AT_decl_file. Approximate this test by testing if @@ -27496,6 +27593,7 @@ fi $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; } + if test $gcc_cv_as_dwarf2_debug_line = yes \ && test $gcc_cv_as_dwarf2_file_buggy = no; then @@ -27539,6 +27637,7 @@ $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5 $as_echo_n "checking assembler for --gstabs option... " >&6; } if test "${gcc_cv_as_gstabs_flag+set}" = set; then : @@ -27575,6 +27674,7 @@ $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5 $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; } if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then : @@ -27609,6 +27709,7 @@ if test $gcc_cv_as_debug_prefix_map_flag = yes; then $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compressed debug sections" >&5 @@ -27659,6 +27760,7 @@ fi $as_echo "$gcc_cv_as_compress_debug" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_COMPRESS_DEBUG $gcc_cv_as_compress_debug _ACEOF @@ -27705,6 +27807,7 @@ $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h fi + if test x$with_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ && test "$prefix" != "NONE"; then @@ -27801,6 +27904,7 @@ if test $glibc_version_major -gt 2 \ fi fi + fi if test x$enable_gnu_unique_object = xyes; then diff --git a/gcc/configure.ac b/gcc/configure.ac index 241e82d..e0eae57 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2740,6 +2740,8 @@ L2:], fi fi]], [AC_DEFINE(HAVE_AS_LEB128, 1, + [Define if your assembler supports .sleb128 and .uleb128.])], + [AC_DEFINE(HAVE_AS_LEB128, 0, [Define if your assembler supports .sleb128 and .uleb128.])]) # Check if we have assembler support for unwind directives. diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index ae81445..8f40d68 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -592,53 +592,55 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 - fputs ("\t.uleb128 ", asm_out_file); - fprint_whex (asm_out_file, value); - - if (flag_debug_asm && comment) + if (HAVE_AS_LEB128) { - fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); - vfprintf (asm_out_file, comment, ap); + fputs ("\t.uleb128 ", asm_out_file); + fprint_whex (asm_out_file, value); + + if (flag_debug_asm && comment) + { + fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); + vfprintf (asm_out_file, comment, ap); + } } -#else - { - unsigned HOST_WIDE_INT work = value; - const char *byte_op = targetm.asm_out.byte_op; - - if (byte_op) - fputs (byte_op, asm_out_file); - do - { - int byte = (work & 0x7f); - work >>= 7; - if (work != 0) - /* More bytes to follow. */ - byte |= 0x80; - - if (byte_op) - { - fprintf (asm_out_file, "%#x", byte); - if (work != 0) - fputc (',', asm_out_file); - } - else - assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1); - } - while (work != 0); - - if (flag_debug_asm) + else { - fprintf (asm_out_file, "\t%s uleb128 " HOST_WIDE_INT_PRINT_HEX, - ASM_COMMENT_START, value); - if (comment) + unsigned HOST_WIDE_INT work = value; + const char *byte_op = targetm.asm_out.byte_op; + + if (byte_op) + fputs (byte_op, asm_out_file); + do { - fputs ("; ", asm_out_file); - vfprintf (asm_out_file, comment, ap); + int byte = (work & 0x7f); + work >>= 7; + if (work != 0) + /* More bytes to follow. */ + byte |= 0x80; + + if (byte_op) + { + fprintf (asm_out_file, "%#x", byte); + if (work != 0) + fputc (',', asm_out_file); + } + else + assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1); + } + while (work != 0); + + if (flag_debug_asm) + { + fprintf (asm_out_file, "\t%s uleb128 " HOST_WIDE_INT_PRINT_HEX, + ASM_COMMENT_START, value); + if (comment) + { + fputs ("; ", asm_out_file); + vfprintf (asm_out_file, comment, ap); + } } } - } -#endif + putc ('\n', asm_out_file); va_end (ap); @@ -677,55 +679,57 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 - fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value); - - if (flag_debug_asm && comment) + if (HAVE_AS_LEB128) { - fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); - vfprintf (asm_out_file, comment, ap); + fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value); + + if (flag_debug_asm && comment) + { + fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); + vfprintf (asm_out_file, comment, ap); + } } -#else - { - HOST_WIDE_INT work = value; - int more, byte; - const char *byte_op = targetm.asm_out.byte_op; - - if (byte_op) - fputs (byte_op, asm_out_file); - do - { - byte = (work & 0x7f); - /* arithmetic shift */ - work >>= 7; - more = !((work == 0 && (byte & 0x40) == 0) - || (work == -1 && (byte & 0x40) != 0)); - if (more) - byte |= 0x80; - - if (byte_op) - { - fprintf (asm_out_file, "%#x", byte); - if (more) - fputc (',', asm_out_file); - } - else - assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1); - } - while (more); - - if (flag_debug_asm) + else { - fprintf (asm_out_file, "\t%s sleb128 " HOST_WIDE_INT_PRINT_DEC, - ASM_COMMENT_START, value); - if (comment) + HOST_WIDE_INT work = value; + int more, byte; + const char *byte_op = targetm.asm_out.byte_op; + + if (byte_op) + fputs (byte_op, asm_out_file); + do { - fputs ("; ", asm_out_file); - vfprintf (asm_out_file, comment, ap); + byte = (work & 0x7f); + /* arithmetic shift */ + work >>= 7; + more = !((work == 0 && (byte & 0x40) == 0) + || (work == -1 && (byte & 0x40) != 0)); + if (more) + byte |= 0x80; + + if (byte_op) + { + fprintf (asm_out_file, "%#x", byte); + if (more) + fputc (',', asm_out_file); + } + else + assemble_integer (GEN_INT (byte), 1, BITS_PER_UNIT, 1); + } + while (more); + + if (flag_debug_asm) + { + fprintf (asm_out_file, "\t%s sleb128 " HOST_WIDE_INT_PRINT_DEC, + ASM_COMMENT_START, value); + if (comment) + { + fputs ("; ", asm_out_file); + vfprintf (asm_out_file, comment, ap); + } } } - } -#endif + fputc ('\n', asm_out_file); va_end (ap); @@ -740,14 +744,12 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + gcc_assert (HAVE_AS_LEB128); + fputs ("\t.uleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); putc ('-', asm_out_file); assemble_name (asm_out_file, lab2); -#else - gcc_unreachable (); -#endif if (flag_debug_asm && comment) { @@ -770,14 +772,12 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + gcc_assert (HAVE_AS_LEB128); + fputs ("\t.sleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); putc ('-', asm_out_file); assemble_name (asm_out_file, lab2); -#else - gcc_unreachable (); -#endif if (flag_debug_asm && comment) { diff --git a/gcc/except.c b/gcc/except.c index 8aeb4e8..2feff1d 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -215,10 +215,8 @@ static int add_call_site (rtx, int, int); static void push_uleb128 (vec<uchar, va_gc> **, unsigned int); static void push_sleb128 (vec<uchar, va_gc> **, int); -#ifndef HAVE_AS_LEB128 static int dw2_size_of_call_site_table (int); static int sjlj_size_of_call_site_table (void); -#endif static void dw2_output_call_site_table (int, int); static void sjlj_output_call_site_table (void); @@ -2696,7 +2694,6 @@ push_sleb128 (vec<uchar, va_gc> **data_area, int value) } -#ifndef HAVE_AS_LEB128 static int dw2_size_of_call_site_table (int section) { @@ -2731,7 +2728,6 @@ sjlj_size_of_call_site_table (void) return size; } -#endif static void dw2_output_call_site_table (int cs_format, int section) @@ -2921,13 +2917,10 @@ static void output_one_function_exception_table (int section) { int tt_format, cs_format, lp_format, i; -#ifdef HAVE_AS_LEB128 char ttype_label[32]; char cs_after_size_label[32]; char cs_end_label[32]; -#else int call_site_len; -#endif int have_tt_data; int tt_format_size = 0; @@ -2942,11 +2935,11 @@ output_one_function_exception_table (int section) else { tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1); -#ifdef HAVE_AS_LEB128 - ASM_GENERATE_INTERNAL_LABEL (ttype_label, - section ? "LLSDATTC" : "LLSDATT", - current_function_funcdef_no); -#endif + if (HAVE_AS_LEB128) + ASM_GENERATE_INTERNAL_LABEL (ttype_label, + section ? "LLSDATTC" : "LLSDATT", + current_function_funcdef_no); + tt_format_size = size_of_encoded_value (tt_format); assemble_align (tt_format_size * BITS_PER_UNIT); @@ -2972,86 +2965,93 @@ output_one_function_exception_table (int section) dw2_asm_output_data (1, tt_format, "@TType format (%s)", eh_data_format_name (tt_format)); -#ifndef HAVE_AS_LEB128 - if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) - call_site_len = sjlj_size_of_call_site_table (); - else - call_site_len = dw2_size_of_call_site_table (section); -#endif + if (!HAVE_AS_LEB128) + { + if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) + call_site_len = sjlj_size_of_call_site_table (); + else + call_site_len = dw2_size_of_call_site_table (section); + } /* A pc-relative 4-byte displacement to the @TType data. */ if (have_tt_data) { -#ifdef HAVE_AS_LEB128 - char ttype_after_disp_label[32]; - ASM_GENERATE_INTERNAL_LABEL (ttype_after_disp_label, - section ? "LLSDATTDC" : "LLSDATTD", - current_function_funcdef_no); - dw2_asm_output_delta_uleb128 (ttype_label, ttype_after_disp_label, - "@TType base offset"); - ASM_OUTPUT_LABEL (asm_out_file, ttype_after_disp_label); -#else - /* Ug. Alignment queers things. */ - unsigned int before_disp, after_disp, last_disp, disp; + if (HAVE_AS_LEB128) + { + char ttype_after_disp_label[32]; + ASM_GENERATE_INTERNAL_LABEL (ttype_after_disp_label, + section ? "LLSDATTDC" : "LLSDATTD", + current_function_funcdef_no); + dw2_asm_output_delta_uleb128 (ttype_label, ttype_after_disp_label, + "@TType base offset"); + ASM_OUTPUT_LABEL (asm_out_file, ttype_after_disp_label); + } + else + { + /* Ug. Alignment queers things. */ + unsigned int before_disp, after_disp, last_disp, disp; - before_disp = 1 + 1; - after_disp = (1 + size_of_uleb128 (call_site_len) - + call_site_len - + vec_safe_length (crtl->eh.action_record_data) - + (vec_safe_length (cfun->eh->ttype_data) - * tt_format_size)); + before_disp = 1 + 1; + after_disp = (1 + size_of_uleb128 (call_site_len) + + call_site_len + + vec_safe_length (crtl->eh.action_record_data) + + (vec_safe_length (cfun->eh->ttype_data) + * tt_format_size)); - disp = after_disp; - do - { - unsigned int disp_size, pad; + disp = after_disp; + do + { + unsigned int disp_size, pad; - last_disp = disp; - disp_size = size_of_uleb128 (disp); - pad = before_disp + disp_size + after_disp; - if (pad % tt_format_size) - pad = tt_format_size - (pad % tt_format_size); - else - pad = 0; - disp = after_disp + pad; - } - while (disp != last_disp); + last_disp = disp; + disp_size = size_of_uleb128 (disp); + pad = before_disp + disp_size + after_disp; + if (pad % tt_format_size) + pad = tt_format_size - (pad % tt_format_size); + else + pad = 0; + disp = after_disp + pad; + } + while (disp != last_disp); - dw2_asm_output_data_uleb128 (disp, "@TType base offset"); -#endif - } + dw2_asm_output_data_uleb128 (disp, "@TType base offset"); + } + } /* Indicate the format of the call-site offsets. */ -#ifdef HAVE_AS_LEB128 - cs_format = DW_EH_PE_uleb128; -#else - cs_format = DW_EH_PE_udata4; -#endif + if (HAVE_AS_LEB128) + cs_format = DW_EH_PE_uleb128; + else + cs_format = DW_EH_PE_udata4; + dw2_asm_output_data (1, cs_format, "call-site format (%s)", eh_data_format_name (cs_format)); -#ifdef HAVE_AS_LEB128 - ASM_GENERATE_INTERNAL_LABEL (cs_after_size_label, - section ? "LLSDACSBC" : "LLSDACSB", - current_function_funcdef_no); - ASM_GENERATE_INTERNAL_LABEL (cs_end_label, - section ? "LLSDACSEC" : "LLSDACSE", - current_function_funcdef_no); - dw2_asm_output_delta_uleb128 (cs_end_label, cs_after_size_label, - "Call-site table length"); - ASM_OUTPUT_LABEL (asm_out_file, cs_after_size_label); - if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) - sjlj_output_call_site_table (); - else - dw2_output_call_site_table (cs_format, section); - ASM_OUTPUT_LABEL (asm_out_file, cs_end_label); -#else - dw2_asm_output_data_uleb128 (call_site_len, "Call-site table length"); - if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) - sjlj_output_call_site_table (); + if (HAVE_AS_LEB128) + { + ASM_GENERATE_INTERNAL_LABEL (cs_after_size_label, + section ? "LLSDACSBC" : "LLSDACSB", + current_function_funcdef_no); + ASM_GENERATE_INTERNAL_LABEL (cs_end_label, + section ? "LLSDACSEC" : "LLSDACSE", + current_function_funcdef_no); + dw2_asm_output_delta_uleb128 (cs_end_label, cs_after_size_label, + "Call-site table length"); + ASM_OUTPUT_LABEL (asm_out_file, cs_after_size_label); + if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) + sjlj_output_call_site_table (); + else + dw2_output_call_site_table (cs_format, section); + ASM_OUTPUT_LABEL (asm_out_file, cs_end_label); + } else - dw2_output_call_site_table (cs_format, section); -#endif + { + dw2_asm_output_data_uleb128 (call_site_len, "Call-site table length"); + if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) + sjlj_output_call_site_table (); + else + dw2_output_call_site_table (cs_format, section); + } /* ??? Decode and interpret the data for flag_debug_asm. */ { @@ -3070,10 +3070,8 @@ output_one_function_exception_table (int section) output_ttype (type, tt_format, tt_format_size); } -#ifdef HAVE_AS_LEB128 - if (have_tt_data) - ASM_OUTPUT_LABEL (asm_out_file, ttype_label); -#endif + if (HAVE_AS_LEB128 && have_tt_data) + ASM_OUTPUT_LABEL (asm_out_file, ttype_label); /* ??? Decode and interpret the data for flag_debug_asm. */ if (targetm.arm_eabi_unwinder) -- 2.9.0 diff with -w diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 index 38dd899..791f2a7 100644 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -550,6 +550,10 @@ AC_CACHE_CHECK([assembler for $1], [$2], ifelse([$7],,,[dnl if test $[$2] = yes; then $7 +fi]) +ifelse([$8],,,[dnl +if test $[$2] != yes; then + $8 fi])]) dnl gcc_SUN_LD_VERSION diff --git a/gcc/configure b/gcc/configure index 871ed0c..e286123 100755 --- a/gcc/configure +++ b/gcc/configure @@ -22485,6 +22485,7 @@ $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5 $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; } if test "${gcc_cv_as_max_skip_p2align+set}" = set; then : @@ -22520,6 +22521,7 @@ $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5 $as_echo_n "checking assembler for .literal16... " >&6; } if test "${gcc_cv_as_literal16+set}" = set; then : @@ -22555,6 +22557,7 @@ $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5 $as_echo_n "checking assembler for working .subsection -1... " >&6; } if test "${gcc_cv_as_subsection_m1+set}" = set; then : @@ -22602,6 +22605,7 @@ $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5 $as_echo_n "checking assembler for .weak... " >&6; } if test "${gcc_cv_as_weak+set}" = set; then : @@ -22637,6 +22641,7 @@ $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5 $as_echo_n "checking assembler for .weakref... " >&6; } if test "${gcc_cv_as_weakref+set}" = set; then : @@ -22672,6 +22677,7 @@ $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5 $as_echo_n "checking assembler for .nsubspa comdat... " >&6; } if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then : @@ -22708,6 +22714,7 @@ $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h fi + # .hidden needs to be supported in both the assembler and the linker, # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for; we have to check the @@ -22747,6 +22754,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5 $as_echo "$gcc_cv_as_hidden" >&6; } + case "${target}" in *-*-darwin*) # Darwin as has some visibility support, though with a different syntax. @@ -23199,6 +23207,11 @@ if test $gcc_cv_as_leb128 = yes; then $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h fi +if test $gcc_cv_as_leb128 != yes; then + +$as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h + +fi # Check if we have assembler support for unwind directives. { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5 @@ -23278,6 +23291,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5 $as_echo "$gcc_cv_as_cfi_directive" >&6; } + if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5 $as_echo_n "checking assembler for working cfi advance... " >&6; } @@ -23315,6 +23329,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5 $as_echo "$gcc_cv_as_cfi_advance_working" >&6; } + else # no objdump, err on the side of caution gcc_cv_as_cfi_advance_working=no @@ -23358,6 +23373,7 @@ fi $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes; then echo 1; else echo 0; fi` @@ -23410,6 +23426,7 @@ $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes; then echo 1; else echo 0; fi` @@ -23513,6 +23530,7 @@ fi $as_echo "$gcc_cv_as_eh_frame" >&6; } + if test $gcc_cv_as_eh_frame = buggy; then $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h @@ -23550,6 +23568,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 $as_echo "$gcc_cv_as_shf_merge" >&6; } + if test $gcc_cv_as_shf_merge = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 $as_echo_n "checking assembler for section merging support... " >&6; } @@ -23582,6 +23601,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5 $as_echo "$gcc_cv_as_shf_merge" >&6; } + fi cat >>confdefs.h <<_ACEOF @@ -23620,6 +23640,7 @@ $as_echo "#define HAVE_AS_STABS_DIRECTIVE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support (GNU as)" >&5 $as_echo_n "checking assembler for COMDAT group support (GNU as)... " >&6; } if test "${gcc_cv_as_comdat_group+set}" = set; then : @@ -23651,6 +23672,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5 $as_echo "$gcc_cv_as_comdat_group" >&6; } + if test $gcc_cv_as_comdat_group = yes; then gcc_cv_as_comdat_group_percent=no gcc_cv_as_comdat_group_group=no @@ -23686,6 +23708,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5 $as_echo "$gcc_cv_as_comdat_group_percent" >&6; } + if test $gcc_cv_as_comdat_group_percent = yes; then gcc_cv_as_comdat_group_group=no else @@ -23736,6 +23759,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_group" >&5 $as_echo "$gcc_cv_as_comdat_group_group" >&6; } + ;; esac if test -z "${gcc_cv_as_comdat_group_group+set}"; then @@ -23843,6 +23867,7 @@ $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h fi + # Thread-local storage - the check is heavily parameterized. conftest_s= tls_first_major= @@ -24340,6 +24365,7 @@ $as_echo "$gcc_cv_as_tls" >&6; } if test $gcc_cv_as_tls = yes; then set_have_as_tls=yes fi + fi if test $set_have_as_tls = yes ; then @@ -24513,6 +24539,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aarch64_mabi" >&5 $as_echo "$gcc_cv_as_aarch64_mabi" >&6; } + if test x$gcc_cv_as_aarch64_mabi = xyes; then $as_echo "#define HAVE_AS_MABI_OPTION 1" >>confdefs.h @@ -24572,6 +24599,7 @@ if test $gcc_cv_as_aarch64_picreloc = yes; then $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h fi + # Enable default workaround for AArch64 Cortex-A53 erratum 835769. # Check whether --enable-fix-cortex-a53-835769 was given. if test "${enable_fix_cortex_a53_835769+set}" = set; then : @@ -24660,6 +24688,7 @@ if test $gcc_cv_as_alpha_explicit_relocs = yes; then $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5 $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; } if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then : @@ -24697,6 +24726,7 @@ if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h fi + ;; avr-*-*) @@ -24731,6 +24761,7 @@ $as_echo "#define HAVE_AS_AVR_MLINK_RELAX_OPTION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mrmw option" >&5 $as_echo_n "checking assembler for -mrmw option... " >&6; } if test "${gcc_cv_as_avr_mrmw+set}" = set; then : @@ -24761,6 +24792,7 @@ if test $gcc_cv_as_avr_mrmw = yes; then $as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h fi + ;; cris-*-*) @@ -24798,6 +24830,7 @@ if test $gcc_cv_as_cris_no_mul_bug = yes; then $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h fi + ;; sparc*-*-*) @@ -24832,6 +24865,7 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5 $as_echo_n "checking assembler for -relax option... " >&6; } if test "${gcc_cv_as_sparc_relax+set}" = set; then : @@ -24863,6 +24897,7 @@ $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5 $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; } if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then : @@ -24912,6 +24947,7 @@ $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5 $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; } if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then : @@ -25002,7 +25038,9 @@ $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h fi -fi # unaligned pcrel relocs + +fi + # unaligned pcrel relocs { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5 $as_echo_n "checking assembler for offsetable %lo()... " >&6; } @@ -25041,6 +25079,7 @@ $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for FMAF, HPC, and VIS 3.0 instructions" >&5 $as_echo_n "checking assembler for FMAF, HPC, and VIS 3.0 instructions... " >&6; } if test "${gcc_cv_as_sparc_fmaf+set}" = set; then : @@ -25079,6 +25118,7 @@ $as_echo "#define HAVE_AS_FMAF_HPC_VIS3 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC4 instructions" >&5 $as_echo_n "checking assembler for SPARC4 instructions... " >&6; } if test "${gcc_cv_as_sparc_sparc4+set}" = set; then : @@ -25121,6 +25161,7 @@ $as_echo "#define HAVE_AS_SPARC4 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC5 and VIS 4.0 instructions" >&5 $as_echo_n "checking assembler for SPARC5 and VIS 4.0 instructions... " >&6; } if test "${gcc_cv_as_sparc_sparc5+set}" = set; then : @@ -25157,6 +25198,7 @@ $as_echo "#define HAVE_AS_SPARC5_VIS4 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5 $as_echo_n "checking assembler for LEON instructions... " >&6; } if test "${gcc_cv_as_sparc_leon+set}" = set; then : @@ -25193,6 +25235,7 @@ if test $gcc_cv_as_sparc_leon = yes; then $as_echo "#define HAVE_AS_LEON 1" >>confdefs.h fi + ;; i[34567]86-*-* | x86_64-*-*) @@ -25258,6 +25301,7 @@ fi $as_echo "$gcc_cv_as_comm_has_align" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25304,6 +25348,7 @@ if test $gcc_cv_as_ix86_pe_secrel32 = yes; then $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h fi + # Test if the assembler supports the extended form of the .section # directive that specifies section alignment. LTO support uses this, # but normally only after installation, so we warn but don't fail the @@ -25338,6 +25383,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5 $as_echo "$gcc_cv_as_section_has_align" >&6; } + if test x$gcc_cv_as_section_has_align != xyes; then case ",$enable_languages," in *,lto,*) @@ -25383,6 +25429,7 @@ fi $as_echo "$gcc_cv_as_section_has_e" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25419,6 +25466,7 @@ $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5 $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; } if test "${gcc_cv_as_ix86_fildq+set}" = set; then : @@ -25450,6 +25498,7 @@ $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5 $as_echo_n "checking assembler for cmov syntax... " >&6; } if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then : @@ -25481,6 +25530,7 @@ $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5 $as_echo_n "checking assembler for ffreep mnemonic... " >&6; } if test "${gcc_cv_as_ix86_ffreep+set}" = set; then : @@ -25512,6 +25562,7 @@ $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5 $as_echo_n "checking assembler for .quad directive... " >&6; } if test "${gcc_cv_as_ix86_quad+set}" = set; then : @@ -25543,6 +25594,7 @@ $as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5 $as_echo_n "checking assembler for sahf mnemonic... " >&6; } if test "${gcc_cv_as_ix86_sahf+set}" = set; then : @@ -25575,6 +25627,7 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for interunit movq mnemonic" >&5 $as_echo_n "checking assembler for interunit movq mnemonic... " >&6; } if test "${gcc_cv_as_ix86_interunit_movq+set}" = set; then : @@ -25604,6 +25657,7 @@ fi $as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_INTERUNIT_MOVQ `if test $gcc_cv_as_ix86_interunit_movq = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25640,6 +25694,7 @@ $as_echo "#define HAVE_AS_IX86_HLE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5 $as_echo_n "checking assembler for swap suffix... " >&6; } if test "${gcc_cv_as_ix86_swap+set}" = set; then : @@ -25671,6 +25726,7 @@ $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5 $as_echo_n "checking assembler for different section symbol subtraction... " >&6; } if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then : @@ -25708,6 +25764,7 @@ $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5 $as_echo_n "checking assembler for rep and lock prefix... " >&6; } if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then : @@ -25745,6 +25802,7 @@ $as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ud2 mnemonic" >&5 $as_echo_n "checking assembler for ud2 mnemonic... " >&6; } if test "${gcc_cv_as_ix86_ud2+set}" = set; then : @@ -25776,6 +25834,7 @@ $as_echo "#define HAVE_AS_IX86_UD2 1" >>confdefs.h fi + # Enforce 32-bit output with gas and gld. if test x$gas = xyes; then as_ix86_gas_32_opt="--32" @@ -25823,6 +25882,7 @@ $as_echo "#define HAVE_AS_IX86_TLSGDPLT 1" >>confdefs.h fi + conftest_s=' .section .tdata,"aw'$tls_section_flag'",@progbits tls_ld: @@ -25860,6 +25920,7 @@ fi $as_echo "$gcc_cv_as_ix86_tlsldmplt" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLSLDMPLT `if test $gcc_cv_as_ix86_tlsldmplt = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25910,6 +25971,7 @@ fi $as_echo "$gcc_cv_as_ix86_tlsldm" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLSLDM `if test $gcc_cv_as_ix86_tlsldm = yes; then echo 1; else echo 0; fi` _ACEOF @@ -25963,6 +26025,7 @@ fi $as_echo "$gcc_cv_as_ix86_got32x" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_GOT32X `if test x"$gcc_cv_as_ix86_got32x" = xyes; then echo 1; else echo 0; fi` _ACEOF @@ -26003,6 +26066,7 @@ fi $as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` _ACEOF @@ -26057,6 +26121,7 @@ fi $as_echo "$gcc_cv_as_ix86_tls_get_addr_via_got" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_IX86_TLS_GET_ADDR_GOT `if test x"$gcc_cv_as_ix86_tls_get_addr_via_got" = xyes; then echo 1; else echo 0; fi` _ACEOF @@ -26102,6 +26167,7 @@ $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h fi + ;; powerpc*-*-*) @@ -26134,6 +26200,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5 $as_echo "$gcc_cv_as_machine_directive" >&6; } + if test x$gcc_cv_as_machine_directive != xyes; then echo "*** This target requires an assembler supporting \".machine\"" >&2 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 @@ -26188,6 +26255,7 @@ $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr5" .csect .text[PR] @@ -26232,6 +26300,7 @@ $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr5x" .csect .text[PR] @@ -26276,6 +26345,7 @@ $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26320,6 +26390,7 @@ $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .csect .text[PR] LCF..0: @@ -26368,6 +26439,7 @@ $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26412,6 +26484,7 @@ $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr6" .csect .text[PR] @@ -26456,6 +26529,7 @@ $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr7" .csect .text[PR] @@ -26500,6 +26574,7 @@ $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr7" .csect .text[PR] @@ -26544,6 +26619,7 @@ $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr8" .csect .text[PR]';; @@ -26586,6 +26662,7 @@ $as_echo "#define HAVE_AS_POWER8 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "pwr9" .csect .text[PR]';; @@ -26628,6 +26705,7 @@ $as_echo "#define HAVE_AS_POWER9 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .csect .text[PR] lwsync';; @@ -26670,6 +26748,7 @@ $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h fi + case $target in *-*-aix*) conftest_s=' .machine "476" .csect .text[PR] @@ -26714,6 +26793,7 @@ $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then : @@ -26749,6 +26829,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5 $as_echo_n "checking assembler for tls marker support... " >&6; } if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then : @@ -26784,6 +26865,7 @@ $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for prologue entry point marker support" >&5 $as_echo_n "checking assembler for prologue entry point marker support... " >&6; } if test "${gcc_cv_as_powerpc_entry_markers+set}" = set; then : @@ -26819,6 +26901,7 @@ $as_echo "#define HAVE_AS_ENTRY_MARKERS 1" >>confdefs.h fi + case $target in *-*-aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX .ref support" >&5 @@ -26861,6 +26944,7 @@ $as_echo "#define HAVE_AS_REF 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX DWARF location lists section support" >&5 $as_echo_n "checking assembler for AIX DWARF location lists section support... " >&6; } if test "${gcc_cv_as_aix_dwloc+set}" = set; then : @@ -26898,6 +26982,7 @@ if test $gcc_cv_as_aix_dwloc = yes; then $as_echo "#define HAVE_XCOFF_DWARF_EXTRAS 1" >>confdefs.h fi + ;; esac ;; @@ -26939,6 +27024,7 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5 $as_echo_n "checking assembler for -mno-shared support... " >&6; } if test "${gcc_cv_as_mips_no_shared+set}" = set; then : @@ -26974,6 +27060,7 @@ $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; } if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then : @@ -27009,6 +27096,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .module support" >&5 $as_echo_n "checking assembler for .module support... " >&6; } if test "${gcc_cv_as_mips_dot_module+set}" = set; then : @@ -27040,6 +27128,7 @@ if test $gcc_cv_as_mips_dot_module = yes; then $as_echo "#define HAVE_AS_DOT_MODULE 1" >>confdefs.h fi + if test x$gcc_cv_as_mips_dot_module = xno \ && test x$with_fp_32 != x; then as_fn_error "Requesting --with-fp-32= requires assembler support for .module." "$LINENO" 5 @@ -27076,6 +27165,7 @@ $as_echo "#define HAVE_GAS_MICROMIPS 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5 $as_echo_n "checking assembler for .dtprelword support... " >&6; } if test "${gcc_cv_as_mips_dtprelword+set}" = set; then : @@ -27115,6 +27205,7 @@ $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for DSPR1 mult with four accumulators support" >&5 $as_echo_n "checking assembler for DSPR1 mult with four accumulators support... " >&6; } if test "${gcc_cv_as_mips_dspr1_mult+set}" = set; then : @@ -27154,6 +27245,7 @@ $as_echo "#define HAVE_AS_DSPR1_MULT 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5 $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; } gcc_cv_as_ld_jalr_reloc=no @@ -27273,6 +27365,7 @@ if test $gcc_cv_as_mips_nan = yes; then $as_echo "#define HAVE_AS_NAN 1" >>confdefs.h fi + if test x$gcc_cv_as_mips_nan = xno \ && test x$with_nan != x; then as_fn_error "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5 @@ -27313,6 +27406,7 @@ if test $gcc_cv_as_s390_gnu_attribute = yes; then $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine and .machinemode support" >&5 $as_echo_n "checking assembler for .machine and .machinemode support... " >&6; } if test "${gcc_cv_as_s390_machine_machinemode+set}" = set; then : @@ -27350,6 +27444,7 @@ if test $gcc_cv_as_s390_machine_machinemode = yes; then $as_echo "#define HAVE_AS_MACHINE_MACHINEMODE 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for architecture modifiers support" >&5 $as_echo_n "checking assembler for architecture modifiers support... " >&6; } if test "${gcc_cv_as_s390_architecture_modifiers+set}" = set; then : @@ -27384,6 +27479,7 @@ if test $gcc_cv_as_s390_architecture_modifiers = yes; then $as_echo "#define HAVE_AS_ARCHITECTURE_MODIFIERS 1" >>confdefs.h fi + ;; esac @@ -27464,6 +27560,7 @@ fi $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; } + # The .debug_line file table must be in the exact order that # we specified the files, since these indices are also used # by DW_AT_decl_file. Approximate this test by testing if @@ -27496,6 +27593,7 @@ fi $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; } + if test $gcc_cv_as_dwarf2_debug_line = yes \ && test $gcc_cv_as_dwarf2_file_buggy = no; then @@ -27539,6 +27637,7 @@ $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5 $as_echo_n "checking assembler for --gstabs option... " >&6; } if test "${gcc_cv_as_gstabs_flag+set}" = set; then : @@ -27575,6 +27674,7 @@ $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5 $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; } if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then : @@ -27609,6 +27709,7 @@ if test $gcc_cv_as_debug_prefix_map_flag = yes; then $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compressed debug sections" >&5 @@ -27659,6 +27760,7 @@ fi $as_echo "$gcc_cv_as_compress_debug" >&6; } + cat >>confdefs.h <<_ACEOF #define HAVE_AS_COMPRESS_DEBUG $gcc_cv_as_compress_debug _ACEOF @@ -27705,6 +27807,7 @@ $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h fi + if test x$with_sysroot = x && test x$host = x$target \ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ && test "$prefix" != "NONE"; then @@ -27801,6 +27904,7 @@ if test $glibc_version_major -gt 2 \ fi fi + fi if test x$enable_gnu_unique_object = xyes; then diff --git a/gcc/configure.ac b/gcc/configure.ac index 241e82d..e0eae57 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2740,6 +2740,8 @@ L2:], fi fi]], [AC_DEFINE(HAVE_AS_LEB128, 1, + [Define if your assembler supports .sleb128 and .uleb128.])], + [AC_DEFINE(HAVE_AS_LEB128, 0, [Define if your assembler supports .sleb128 and .uleb128.])]) # Check if we have assembler support for unwind directives. diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index ae81445..8f40d68 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -592,7 +592,8 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) + { fputs ("\t.uleb128 ", asm_out_file); fprint_whex (asm_out_file, value); @@ -601,7 +602,8 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value, fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); vfprintf (asm_out_file, comment, ap); } -#else + } + else { unsigned HOST_WIDE_INT work = value; const char *byte_op = targetm.asm_out.byte_op; @@ -638,7 +640,7 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value, } } } -#endif + putc ('\n', asm_out_file); va_end (ap); @@ -677,7 +679,8 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) + { fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value); if (flag_debug_asm && comment) @@ -685,7 +688,8 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value, fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); vfprintf (asm_out_file, comment, ap); } -#else + } + else { HOST_WIDE_INT work = value; int more, byte; @@ -725,7 +729,7 @@ dw2_asm_output_data_sleb128 (HOST_WIDE_INT value, } } } -#endif + fputc ('\n', asm_out_file); va_end (ap); @@ -740,14 +744,12 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + gcc_assert (HAVE_AS_LEB128); + fputs ("\t.uleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); putc ('-', asm_out_file); assemble_name (asm_out_file, lab2); -#else - gcc_unreachable (); -#endif if (flag_debug_asm && comment) { @@ -770,14 +772,12 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED, va_start (ap, comment); -#ifdef HAVE_AS_LEB128 + gcc_assert (HAVE_AS_LEB128); + fputs ("\t.sleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); putc ('-', asm_out_file); assemble_name (asm_out_file, lab2); -#else - gcc_unreachable (); -#endif if (flag_debug_asm && comment) { diff --git a/gcc/except.c b/gcc/except.c index 8aeb4e8..2feff1d 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -215,10 +215,8 @@ static int add_call_site (rtx, int, int); static void push_uleb128 (vec<uchar, va_gc> **, unsigned int); static void push_sleb128 (vec<uchar, va_gc> **, int); -#ifndef HAVE_AS_LEB128 static int dw2_size_of_call_site_table (int); static int sjlj_size_of_call_site_table (void); -#endif static void dw2_output_call_site_table (int, int); static void sjlj_output_call_site_table (void); @@ -2696,7 +2694,6 @@ push_sleb128 (vec<uchar, va_gc> **data_area, int value) } -#ifndef HAVE_AS_LEB128 static int dw2_size_of_call_site_table (int section) { @@ -2731,7 +2728,6 @@ sjlj_size_of_call_site_table (void) return size; } -#endif static void dw2_output_call_site_table (int cs_format, int section) @@ -2921,13 +2917,10 @@ static void output_one_function_exception_table (int section) { int tt_format, cs_format, lp_format, i; -#ifdef HAVE_AS_LEB128 char ttype_label[32]; char cs_after_size_label[32]; char cs_end_label[32]; -#else int call_site_len; -#endif int have_tt_data; int tt_format_size = 0; @@ -2942,11 +2935,11 @@ output_one_function_exception_table (int section) else { tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1); -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) ASM_GENERATE_INTERNAL_LABEL (ttype_label, section ? "LLSDATTC" : "LLSDATT", current_function_funcdef_no); -#endif + tt_format_size = size_of_encoded_value (tt_format); assemble_align (tt_format_size * BITS_PER_UNIT); @@ -2972,17 +2965,19 @@ output_one_function_exception_table (int section) dw2_asm_output_data (1, tt_format, "@TType format (%s)", eh_data_format_name (tt_format)); -#ifndef HAVE_AS_LEB128 + if (!HAVE_AS_LEB128) + { if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) call_site_len = sjlj_size_of_call_site_table (); else call_site_len = dw2_size_of_call_site_table (section); -#endif + } /* A pc-relative 4-byte displacement to the @TType data. */ if (have_tt_data) { -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) + { char ttype_after_disp_label[32]; ASM_GENERATE_INTERNAL_LABEL (ttype_after_disp_label, section ? "LLSDATTDC" : "LLSDATTD", @@ -2990,7 +2985,9 @@ output_one_function_exception_table (int section) dw2_asm_output_delta_uleb128 (ttype_label, ttype_after_disp_label, "@TType base offset"); ASM_OUTPUT_LABEL (asm_out_file, ttype_after_disp_label); -#else + } + else + { /* Ug. Alignment queers things. */ unsigned int before_disp, after_disp, last_disp, disp; @@ -3018,19 +3015,20 @@ output_one_function_exception_table (int section) while (disp != last_disp); dw2_asm_output_data_uleb128 (disp, "@TType base offset"); -#endif + } } /* Indicate the format of the call-site offsets. */ -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) cs_format = DW_EH_PE_uleb128; -#else + else cs_format = DW_EH_PE_udata4; -#endif + dw2_asm_output_data (1, cs_format, "call-site format (%s)", eh_data_format_name (cs_format)); -#ifdef HAVE_AS_LEB128 + if (HAVE_AS_LEB128) + { ASM_GENERATE_INTERNAL_LABEL (cs_after_size_label, section ? "LLSDACSBC" : "LLSDACSB", current_function_funcdef_no); @@ -3045,13 +3043,15 @@ output_one_function_exception_table (int section) else dw2_output_call_site_table (cs_format, section); ASM_OUTPUT_LABEL (asm_out_file, cs_end_label); -#else + } + else + { dw2_asm_output_data_uleb128 (call_site_len, "Call-site table length"); if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ) sjlj_output_call_site_table (); else dw2_output_call_site_table (cs_format, section); -#endif + } /* ??? Decode and interpret the data for flag_debug_asm. */ { @@ -3070,10 +3070,8 @@ output_one_function_exception_table (int section) output_ttype (type, tt_format, tt_format_size); } -#ifdef HAVE_AS_LEB128 - if (have_tt_data) + if (HAVE_AS_LEB128 && have_tt_data) ASM_OUTPUT_LABEL (asm_out_file, ttype_label); -#endif /* ??? Decode and interpret the data for flag_debug_asm. */ if (targetm.arm_eabi_unwinder)