gcc assembler register names

Peter Naulls peter at chocky.org
Tue Oct 1 11:07:53 PDT 2002


In message <476aad7e4b.peter at moo.chocky.org>
          Peter Naulls <peter at chocky.org> wrote:

> It should also be noted that the -gcc flag currently only define lower
> case register names.

Therefore I suggest the following patch, and all the other -gcc stuff
can be removed.

Index: riscos-aof/as/get.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/riscos-aof/as/get.c,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 get.c
--- riscos-aof/as/get.c 30 Mar 2002 09:48:24 -0000      1.3.2.2
+++ riscos-aof/as/get.c 1 Oct 2002 18:07:43 -0000
@@ -53,11 +53,11 @@
   if (lexSym.tag == LexNone)
     return 0;
 
-  if (gcc_backend && (lexSym.tag == LexId))
+  if (lexSym.tag == LexId)
     for (loop = 0; loop < sizeof (cpu_regs) / sizeof (struct reg_id); loop++)
       {
        if ((cpu_regs[loop].len == lexSym.LexId.len) &&
-        !strncmp (cpu_regs[loop].name, lexSym.LexId.str, lexSym.LexId.len))
+        !strncasecmp (cpu_regs[loop].name, lexSym.LexId.str, lexSym.LexId.len))
          return cpu_regs[loop].reg_no;
       }
 
@@ -87,15 +87,16 @@
   Symbol *sym;
   unsigned int loop;
 
+
   lexSym = lexGetId ();
   if (lexSym.tag == LexNone)
     return 0;
 
-  if (gcc_backend && (lexSym.tag == LexId) && (lexSym.LexId.len == 2))
+  if (lexSym.tag == LexId && lexSym.LexId.len == 2)
     for (loop = 0; loop < sizeof (cpu_regs) / sizeof (struct reg_id); loop++)
       {
        if ((cpu_regs[loop].len == lexSym.LexId.len) &&
-        !strncmp (cpu_regs[loop].name, lexSym.LexId.str, lexSym.LexId.len))
+        !strncasecmp (cpu_regs[loop].name, lexSym.LexId.str, lexSym.LexId.len))
          return cpu_regs[loop].reg_no;
       }
 


-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
------------------------------------------------------------------------
The RISC OS Browser Issue - http://www.chocky.org/unix/browser.html



More information about the gcc mailing list