This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Small gas patch for reading alternate forms of MIPS coprocessorregister names
- From: Matt Hiller <hiller at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 23 Apr 2002 17:22:43 -0700 (PDT)
- Subject: Small gas patch for reading alternate forms of MIPS coprocessorregister names
This patch is needed for work that I'm doing on gcc right now; there are
tests in the gcc testsuite that test its functionality. Okay to apply?
2002-04-23 Matt Hiller <hiller@redhat.com>
* config/tc-mips.c (mips_ip): Add ability to read "$cKrNN" forms
of coprocessor register names.
Index: tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.117
diff -d -c -p -r1.117 tc-mips.c
*** tc-mips.c 22 Apr 2002 21:50:44 -0000 1.117
--- tc-mips.c 24 Apr 2002 00:21:58 -0000
*************** mips_ip (str, ip)
*** 7937,7942 ****
--- 7937,7950 ----
s_reset = s;
if (s[0] == '$')
{
+ /* Allow "$cKrNN" as coprocessor register name. */
+ if ((*args == 'E' || *args == 'G') && s[1] == 'c'
+ && (s[2] == '0' || s[2] == '1' || s[2] == '2'
+ || s[2] == '3')
+ && s[3] == 'r')
+ {
+ s += 3;
+ }
if (ISDIGIT (s[1]))
{