aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mmix.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-06-16 15:04:41 +0000
committerHans-Peter Nilsson <hp@axis.com>2008-06-16 15:04:41 +0000
commit1afc8defa6693f44bfe41ac49d62c2d6b4e62f69 (patch)
tree4060f92139779444e27825006c70032948ef55d6 /gas/config/tc-mmix.c
parentc4fbee410b7f1ae0cebf7c6ae2fd41560d5d132b (diff)
downloadgdb-1afc8defa6693f44bfe41ac49d62c2d6b4e62f69.zip
gdb-1afc8defa6693f44bfe41ac49d62c2d6b4e62f69.tar.gz
gdb-1afc8defa6693f44bfe41ac49d62c2d6b4e62f69.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-mmix.c')
-rw-r--r--gas/config/tc-mmix.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index 056298b..c2b3789 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -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)