This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
patch for gas/config/tc-arm.c (lowercased CPSR and SPSR)
- To: binutils at sources dot redhat dot com
- Subject: patch for gas/config/tc-arm.c (lowercased CPSR and SPSR)
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: Fri, 20 Oct 2000 14:43:03 -0400
hi folks.
Intel is complaining that they want to (sometimes) be able to specify
_all_ CPSR flags in lowercase.
Here is a patch that fixes this.
At Nick's request I have also done the same for the SPSR instructions.
And I have taken the liberty of removing lowercased cpsr and spsr's
from the hash table. The simpler the better... :)
ok to install?
Cheers.
Aldy
2000-10-20 Aldy Hernandez <aldyh@redhat.com>
* config/tc-arm.c (psrs): Remove lowercase versions of spsr* and
cpsr*.
(arm_psr_parse): Handle lowercase CPSR and SPSR.
Index: tc-arm.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/config/tc-arm.c,v
retrieving revision 1.152
diff -c -r1.152 tc-arm.c
*** tc-arm.c 2000/09/07 18:05:36 1.152
--- tc-arm.c 2000/10/20 18:25:32
***************
*** 584,603 ****
{"SPSR_csxf", false, PSR_c | PSR_s | PSR_x | PSR_f},
{"SPSR_cxfs", false, PSR_c | PSR_x | PSR_f | PSR_s},
{"SPSR_cxsf", false, PSR_c | PSR_x | PSR_s | PSR_f},
- /* For backwards compatability with older toolchain we also
- support lower case versions of some of these flags. */
- {"cpsr", true, PSR_c | PSR_f},
- {"cpsr_all", true, PSR_c | PSR_f},
- {"spsr", false, PSR_c | PSR_f},
- {"spsr_all", false, PSR_c | PSR_f},
- {"cpsr_flg", true, PSR_f},
- {"cpsr_f", true, PSR_f},
- {"spsr_flg", false, PSR_f},
- {"spsr_f", false, PSR_f},
- {"cpsr_c", true, PSR_c},
- {"cpsr_ctl", true, PSR_c},
- {"spsr_c", false, PSR_c},
- {"spsr_ctl", false, PSR_c}
};
/* start-sanitize-cirrus */
--- 584,589 ----
***************
*** 2064,2069 ****
--- 2050,2063 ----
/* Terminate the word. */
*--p = 0;
+
+ /* CPSR's and SPSR's can now be lowercase. This is just a
+ convenience feature for ease of use and backwards
+ compatibility. */
+ if (!strncmp (start, "cpsr", 4))
+ strncpy (start, "CPSR", 4);
+ else if (!strncmp (start, "spsr", 4))
+ strncpy (start, "SPSR", 4);
/* Now locate the word in the psr hash table. */
psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start);