X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fread.c;h=ad9363a60449f2f09756fefba889344df8b65a2a;hb=017257f8db5c860dd46d7ba45fa867a3a6a7c49e;hp=32ac5e2c0f3ef5c13ff2859cde4ce800e70423a4;hpb=847d4311801b81716f9670f25ae97aace2740519;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/read.c b/gas/read.c index 32ac5e2c0f..ad9363a604 100644 --- a/gas/read.c +++ b/gas/read.c @@ -629,6 +629,7 @@ read_a_source_file (char *name) was_new_line = is_end_of_line[(unsigned char) input_line_pointer[-1]]; if (was_new_line) { + symbol_set_value_now (&dot_symbol); #ifdef md_start_line_hook md_start_line_hook (); #endif @@ -1128,6 +1129,7 @@ read_a_source_file (char *name) md_after_pass_hook (); #endif } + symbol_set_value_now (&dot_symbol); quit: @@ -1610,6 +1612,8 @@ s_mri_common (int small ATTRIBUTE_UNUSED) #ifdef S_SET_ALIGN if (align != 0) S_SET_ALIGN (sym, align); +#else + (void) align; #endif if (line_label != NULL) @@ -4261,15 +4265,32 @@ emit_expr (expressionS *exp, unsigned int nbytes) unsigned int size; LITTLENUM_TYPE *nums; - know (nbytes % CHARS_PER_LITTLENUM == 0); - size = exp->X_add_number * CHARS_PER_LITTLENUM; if (nbytes < size) { - as_warn (_("bignum truncated to %d bytes"), nbytes); + int i = nbytes / CHARS_PER_LITTLENUM; + if (i != 0) + { + LITTLENUM_TYPE sign = 0; + if ((generic_bignum[--i] + & (1 << (LITTLENUM_NUMBER_OF_BITS - 1))) != 0) + sign = ~(LITTLENUM_TYPE) 0; + while (++i < exp->X_add_number) + if (generic_bignum[i] != sign) + break; + } + if (i < exp->X_add_number) + as_warn (_("bignum truncated to %d bytes"), nbytes); size = nbytes; } + if (nbytes == 1) + { + md_number_to_chars (p, (valueT) generic_bignum[0], 1); + return; + } + know (nbytes % CHARS_PER_LITTLENUM == 0); + if (target_big_endian) { while (nbytes > size) @@ -5155,7 +5176,9 @@ stringer (int bits_appendzero) const int bitsize = bits_appendzero & ~7; const int append_zero = bits_appendzero & 1; unsigned int c; +#if !defined(NO_LISTING) && defined (OBJ_ELF) char *start; +#endif #ifdef md_flush_pending_output md_flush_pending_output (); @@ -5195,7 +5218,9 @@ stringer (int bits_appendzero) { case '\"': ++input_line_pointer; /*->1st char of string. */ +#if !defined(NO_LISTING) && defined (OBJ_ELF) start = input_line_pointer; +#endif while (is_a_char (c = next_char_of_string ())) stringer_append_char (c, bitsize); @@ -5205,8 +5230,7 @@ stringer (int bits_appendzero) know (input_line_pointer[-1] == '\"'); -#ifndef NO_LISTING -#ifdef OBJ_ELF +#if !defined(NO_LISTING) && defined (OBJ_ELF) /* In ELF, when gcc is emitting DWARF 1 debugging output, it will emit .string with a filename in the .debug section after a sequence of constants. See the comment in @@ -5222,7 +5246,6 @@ stringer (int bits_appendzero) listing_source_file (start); input_line_pointer[-1] = c; } -#endif #endif break;