Bug 6607 - gas interprets large LOC constant argument as stepping backwards
Summary: gas interprets large LOC constant argument as stepping backwards
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
Depends on:
Reported: 2008-06-09 03:25 UTC by Hans-Peter Nilsson
Modified: 2008-06-16 15:28 UTC (History)
1 user (show)

See Also:
Target: mmix-knuth-mmixware
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2008-06-09 03:25:09 UTC
For this code:
        LOC     #8000000000000000
Boot    GETA    $0,DTrap        %set dynamic- and forced-trap  handler

the GAS MMIX port complains as follows:
loc-6.s:4: Error: LOC expression stepping backwards is not supported

It'd reasonable to special-case this value (or any value with the low 56 bits
zero) as pointing to a special unnamed segment, and not stepping relative within
the current segment.  Compare to special-casing of constants for Data_Segment,
Pool_Segment and Stack_Segment.

It'd also be reasonable to treat absolute LOC arguments as unsigned and only
check for "stepping backwards" when there's previous contents.
Comment 1 Hans-Peter Nilsson 2008-06-16 15:28:21 UTC
Committed patch in <http://sourceware.org/ml/binutils/2008-06/msg00138.html>.