bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/12069] New: avr-as: register equates starting with 'r' fails wi


From: avr at bruger dot mine dot nu
Subject: [Bug gas/12069] New: avr-as: register equates starting with 'r' fails with the OUT instruction.
Date: 28 Sep 2010 14:14:28 -0000

Overview Description:
When prefixing an equate with the letter 'r', the OUT instruction complains 
about an incorrect register/register number.


Steps to reproduce:
Create a small source file (test.S) with the following code:
    .equ    rColor3,6
    out    0x02,rColor3

...Assemble using for instance...
avr-as test.S
The output of make is:
test.S:2: Error: register name or number from 0 to 31 required

Same problem if using the following line instead of the equate:
rColor = 6

However, if changing the code to...
    .equ    erColor3,6
    out    0x02,erColor3

The file assembles fine.
It also works fine, if changing the .equ to the following:

erColor3=6
    out    0x02,erColor3


Build Date & Platform:
The full version number of the build is 2.20.1.20100303.


Additional Builds and Platforms:
My build is running on Mac OS X v10.5; but other people have experienced this 
bug as well on a different (most likely Linux) operating system.


Additional information:
I imagine the code in my mind, and expect that the handler for the OUT 
instruction is comparing the character it's reading with 'r', then checks if a 
number follows that letter. If not, it complains.
Otherwise it probably looks up the label in the equates list.
I am not familiar with the source, but have written a few assemblers once.

There's a link to a discussion in the following forum, if it's helpful. I've 
made a downloadable project that triggers the error:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=748743#748743

I do not know if I'm at the right place (I hope I am, though) - if not, please 
let me know.
You may send me email to ask further questions if you like.

-- 
           Summary: avr-as: register equates starting with 'r' fails with
                    the OUT instruction.
           Product: binutils
           Version: 2.20
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: avr at bruger dot mine dot nu
                CC: avr at bruger dot mine dot nu,bug-binutils at gnu dot
                    org


http://sourceware.org/bugzilla/show_bug.cgi?id=12069

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]