PR gas/6607

* config/tc-mmix.c (s_loc): Assume "negative" addresses belong to
	text_section.  Do the "stepping backwards" test for text_section
	using unsigned operands.
This commit is contained in:
Hans-Peter Nilsson 2008-06-16 15:04:41 +00:00
parent c4fbee410b
commit 1afc8defa6
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2008-06-16 Hans-Peter Nilsson <hp@bitrange.com>
PR gas/6607
* config/tc-mmix.c (s_loc): Assume "negative" addresses belong to
text_section. Do the "stepping backwards" test for text_section
using unsigned operands.
2008-06-13 Peter Bergner <bergner@vnet.ibm.com>
* config/tc-ppc.c (ppc_cpu): Use ppc_cpu_t typedef.

View File

@ -3891,7 +3891,9 @@ s_loc (int ignore ATTRIBUTE_UNUSED)
if (exp.X_add_number < ((offsetT) 0x20 << 56))
{
/* Lower than Data_Segment - assume it's .text. */
/* Lower than Data_Segment or in the reserved area (the
segment number is >= 0x80, appearing negative) - assume
it's .text. */
section = text_section;
/* Save the lowest seen location, so we can pass on this
@ -3903,8 +3905,8 @@ s_loc (int ignore ATTRIBUTE_UNUSED)
this one), we org at (this - lower). There's an implicit
"LOC 0" before any entered code. FIXME: handled by spurious
settings of text_has_contents. */
if (exp.X_add_number < 0
|| exp.X_add_number < (offsetT) lowest_text_loc)
if (lowest_text_loc != (bfd_vma) -1
&& (bfd_vma) exp.X_add_number < lowest_text_loc)
{
as_bad (_("LOC expression stepping backwards is not supported"));
exp.X_op = O_absent;
@ -3927,7 +3929,8 @@ s_loc (int ignore ATTRIBUTE_UNUSED)
}
else
{
/* Do the same for the .data section. */
/* Do the same for the .data section, except we don't have
to worry about exp.X_add_number carrying a sign. */
section = data_section;
if (exp.X_add_number < (offsetT) lowest_data_loc)