public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* issue with register name and global variables
@ 2009-07-31  8:44 nagaraju.m
  2009-08-05  1:29 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: nagaraju.m @ 2009-07-31  8:44 UTC (permalink / raw)
  To: binutils

Hi,

    I am generating a global variable with out an underscore in my 
compiler.(gcc-3.3)

eg:
     int r1=10;
    int main()
    {
        return 0;
    }

The problem here is , i have a register named "r1"
So my assembler is issuing an error saying "register value used as 
expression ".
I am using binutils-2.13.1 ( as I am supposed to deal with older 
versions of source code)
So, how I can make sure my assembler differentiate variable name and 
register name.

Thanks,
Nagraj   

      

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: issue with register name and global variables
  2009-07-31  8:44 issue with register name and global variables nagaraju.m
@ 2009-08-05  1:29 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2009-08-05  1:29 UTC (permalink / raw)
  To: nagaraju.m; +Cc: binutils

On Fri, Jul 31, 2009 at 11:58:14AM +0530, nagaraju.m wrote:
> So, how I can make sure my assembler differentiate variable name and  
> register name.

Require a prefix on register names.  eg. %r1.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-05  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31  8:44 issue with register name and global variables nagaraju.m
2009-08-05  1:29 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).