diff options
author | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2016-11-14 10:58:48 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2016-11-14 10:58:48 +0000 |
commit | 61214be10b12d26d2ec7855d9a8681a155b0f953 (patch) | |
tree | c22752892fde2e66aeecd39618b75adcc48d4e5c /gcc/dwarf2asm.c | |
parent | 5129b43be675171c2e4742ae4b1e073249314818 (diff) | |
download | gcc-61214be10b12d26d2ec7855d9a8681a155b0f953.zip gcc-61214be10b12d26d2ec7855d9a8681a155b0f953.tar.gz gcc-61214be10b12d26d2ec7855d9a8681a155b0f953.tar.bz2 |
remove conditional compilation of HAVE_AS_LEB128 code
gcc/ChangeLog:
2016-08-20 Trevor Saunders <tbsaunde+gcc@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.
* dwarf2out.c (output_loc_list): Likewise.
(output_rnglists): Likewise.
From-SVN: r242381
Diffstat (limited to 'gcc/dwarf2asm.c')
-rw-r--r-- | gcc/dwarf2asm.c | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 2e0aae4..922a0c1 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -622,53 +622,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); @@ -707,55 +709,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); @@ -770,14 +774,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) { @@ -800,14 +802,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) { |