summaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-23 16:07:16 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-23 16:07:16 +0000
commite7c691ace7aca0c93f895d1429c3d0f230ce6d58 (patch)
tree3a92e39c3950a0111e36bf45eea110d72fbf1e8a /gcc/config/sh
parenta9a8096c82e4c6042c543cac74ba997302422f68 (diff)
downloadgcc-e7c691ace7aca0c93f895d1429c3d0f230ce6d58.tar.gz
* arc.c (arc_hard_regno_mode_ok): Const-ify.
* arc.h (arc_hard_regno_mode_ok): Likewise. * i386.c (x86_64_reg_class_name): Make static. * m68k.c (regno_reg_class): Const-ify. * m68k.h (regno_reg_class): Likewise. * mcore.c (reg_class_from_letter): Likewise. * mcore.h (reg_class_from_letter): Likewise. * sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns, ext_shift_insns, ext_shift_amounts): Likewise. * sh.h (reg_class_from_letter): Likewise. * sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes, hard_64bit_mode_classes): Likewise. * sparc.h (hard_regno_mode_classes): Likewise. * gcc.c (modify_target): Make static. * gengenrtl.c (defs, formats): Likewise. * reload1.c (elim_table_1, init_elim_table): Const-ify. * tradcpp.c (directive, directive_table, handle_directive, skip_if_group, run_directive): Likewise. cp: * decl2.c (lang_f_options): Const-ify. f: * com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_, ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify. java: * Make-lang.in (keyword.h): Pass -C to gperf to const-ify the static arrays that are output. * jvspec.c (jvgenmain_spec): Make static. * keyword.gperf (struct java_keyword, java_keyword): Const-ify. * keyword.h: Regenerate. * lang.c (string_option, process_option_with_no, lang_f_options, lang_W_options): Const-ify. * lex.c (java_lex): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c10
-rw-r--r--gcc/config/sh/sh.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index d08100d257e..675109a2278 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -122,7 +122,7 @@ char fp_reg_names[][5] =
/* Provide reg_class from a letter such as appears in the machine
description. */
-enum reg_class reg_class_from_letter[] =
+const enum reg_class reg_class_from_letter[] =
{
/* a */ ALL_REGS, /* b */ NO_REGS, /* c */ FPSCR_REGS, /* d */ DF_REGS,
/* e */ NO_REGS, /* f */ FP_REGS, /* g */ NO_REGS, /* h */ NO_REGS,
@@ -957,11 +957,11 @@ output_file_start (file)
}
/* Actual number of instructions used to make a shift by N. */
-static char ashiftrt_insns[] =
+static const char ashiftrt_insns[] =
{ 0,1,2,3,4,5,8,8,8,8,8,8,8,8,8,8,2,3,4,5,8,8,8,8,8,8,8,8,8,8,8,2};
/* Left shift and logical right shift are the same. */
-static char shift_insns[] =
+static const char shift_insns[] =
{ 0,1,1,2,2,3,3,4,1,2,2,3,3,4,3,3,1,2,2,3,3,4,3,3,2,3,3,4,4,4,3,3};
/* Individual shift amounts needed to get the above length sequences.
@@ -982,10 +982,10 @@ static short shift_amounts[32][5] = {
might be clobbered. This is typically used when combined with some
kind of sign or zero extension. */
-static char ext_shift_insns[] =
+static const char ext_shift_insns[] =
{ 0,1,1,2,2,3,2,2,1,2,2,3,3,3,2,2,1,2,2,3,3,4,3,3,2,3,3,4,4,4,3,3};
-static short ext_shift_amounts[32][4] = {
+static const short ext_shift_amounts[32][4] = {
{0}, {1}, {2}, {2, 1},
{2, 2}, {2, 1, 2}, {8, -2}, {8, -1},
{8}, {8, 1}, {8, 2}, {8, 1, 2},
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index aa94109be5f..979e83b9ce7 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -829,7 +829,7 @@ extern int regno_reg_class[FIRST_PSEUDO_REGISTER];
/* Get reg_class from a letter such as appears in the machine
description. */
-extern enum reg_class reg_class_from_letter[];
+extern const enum reg_class reg_class_from_letter[];
#define REG_CLASS_FROM_LETTER(C) \
( ISLOWER (C) ? reg_class_from_letter[(C)-'a'] : NO_REGS )