]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: rx: constify some read-only global vars
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 04:48:48 +0000 (23:48 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 5 Dec 2023 04:49:35 +0000 (23:49 -0500)
sim/rx/rx.c

index 4a7291e6d2486ab843a9b91bef229232064e15b4..7502131f1319d889004337391c0dc210abda06d4 100644 (file)
@@ -36,7 +36,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "misc.h"
 
 #ifdef WITH_PROFILE
-static const char * id_names[] = {
+static const char * const id_names[] = {
   "RXO_unknown",
   "RXO_mov",   /* d = s (signed) */
   "RXO_movbi", /* d = [s,s2] (signed) */
@@ -142,7 +142,7 @@ static const char * id_names[] = {
   "RXO_sccnd", /* d = cond(s) ? 1 : 0 */
 };
 
-static const char * optype_names[] = {
+static const char * const optype_names[] = {
   " -  ",
   "#Imm",      /* #addend */
   " Rn ",      /* Rn */
@@ -332,7 +332,7 @@ div_cycles(long num, long den)
 
 #endif /* else CYCLE_ACCURATE */
 
-static int size2bytes[] = {
+static const int size2bytes[] = {
   4, 1, 1, 1, 2, 2, 2, 3, 4
 };