From da6af203a92aef54dbb61b57d871aaa7e179e7c7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 16 Mar 2001 11:33:54 -0800 Subject: [PATCH] dwarf2asm.c (dw2_asm_output_data): Mask data to the output size. * dwarf2asm.c (dw2_asm_output_data): Mask data to the output size. (dw2_asm_output_data_uleb128): Use space not tab after .uleb128. (dw2_asm_output_delta_uleb128): Likewise. (dw2_asm_output_delta_sleb128): Similarly. (dw2_asm_output_data_sleb128): Similarly. Print number in decimal. From-SVN: r40560 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2asm.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b1e27e9f4c..212cf3885f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -10,6 +10,12 @@ assembler error when redefining file numbers. * config.in, configure: Rebuild. + * dwarf2asm.c (dw2_asm_output_data): Mask data to the output size. + (dw2_asm_output_data_uleb128): Use space not tab after .uleb128. + (dw2_asm_output_delta_uleb128): Likewise. + (dw2_asm_output_delta_sleb128): Similarly. + (dw2_asm_output_data_sleb128): Similarly. Print number in decimal. + 2001-03-16 Michael Meissner * mips.h (BITMASK_HIGH): Replacement for 0x80000000 that avoids diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 464c2b17946..98667350efb 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -112,6 +112,9 @@ dw2_asm_output_data VPARAMS ((int size, unsigned HOST_WIDE_INT value, comment = va_arg (ap, const char *); #endif + if (size * 8 < HOST_BITS_PER_WIDE_INT) + value &= ~(~(unsigned HOST_WIDE_INT)0 << (size * 8)); + #ifdef UNALIGNED_INT_ASM_OP fputs (unaligned_integer_asm_op (size), asm_out_file); fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, value); @@ -458,7 +461,7 @@ dw2_asm_output_data_uleb128 VPARAMS ((unsigned HOST_WIDE_INT value, #endif #ifdef HAVE_AS_LEB128 - fputs ("\t.uleb128\t", asm_out_file); + fputs ("\t.uleb128 ", asm_out_file); fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, value); if (flag_debug_asm && comment) @@ -522,8 +525,8 @@ dw2_asm_output_data_sleb128 VPARAMS ((HOST_WIDE_INT value, #endif #ifdef HAVE_AS_LEB128 - fputs ("\t.sleb128\t", asm_out_file); - fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX, value); + fputs ("\t.sleb128 ", asm_out_file); + fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, value); if (flag_debug_asm && comment) { @@ -589,7 +592,7 @@ dw2_asm_output_delta_uleb128 VPARAMS ((const char *lab1 ATTRIBUTE_UNUSED, #endif #ifdef HAVE_AS_LEB128 - fputs ("\t.uleb128\t", asm_out_file); + fputs ("\t.uleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); fputc ('-', asm_out_file); assemble_name (asm_out_file, lab2); @@ -627,7 +630,7 @@ dw2_asm_output_delta_sleb128 VPARAMS ((const char *lab1 ATTRIBUTE_UNUSED, #endif #ifdef HAVE_AS_LEB128 - fputs ("\t.sleb128\t", asm_out_file); + fputs ("\t.sleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); fputc ('-', asm_out_file); assemble_name (asm_out_file, lab2); -- 2.30.2