From 1df69f4f6c134c94f81ef6fe0229bc4da0e66411 Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Fri, 19 May 2006 11:26:11 +0000 Subject: [PATCH] * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): Un-constify string argument. * config/tc-i386.c, config/tc-i386.h (tc_x86_regname_to_dw2regnum): Likewise. * config/tc-m68k.c, config/tc-m68k.h (tc_m68k_regname_to_dw2regnum): Likewise. * config/tc-ppc.c, config/tc-ppc.h (tc_ppc_regname_to_dw2regnum): Likewise. * config/tc-s390.c, config/tc-s390.h (tc_s390_regname_to_dw2regnum): Likewise. * config/tc-sh.c, config/tc-sh.h (sh_regname_to_dw2regnum): Likewise. * config/tc-sparc.c, config/tc-sparc.h (sparc_regname_to_dw2regnum): Likewise. ------------------------------------------------------------------- --- gas/ChangeLog | 17 +++++++++++++++++ gas/config/tc-arm.c | 4 ++-- gas/config/tc-arm.h | 2 +- gas/config/tc-i386.c | 2 +- gas/config/tc-i386.h | 2 +- gas/config/tc-m68k.c | 2 +- gas/config/tc-m68k.h | 2 +- gas/config/tc-ppc.c | 2 +- gas/config/tc-ppc.h | 2 +- gas/config/tc-s390.c | 2 +- gas/config/tc-s390.h | 2 +- gas/config/tc-sh.c | 2 +- gas/config/tc-sh.h | 2 +- gas/config/tc-sparc.c | 2 +- gas/config/tc-sparc.h | 2 +- 15 files changed, 32 insertions(+), 15 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 20a5a16b29..077395ac5b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,20 @@ +2006-05-19 Thiemo Seufer + + * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum): + Un-constify string argument. + * config/tc-i386.c, config/tc-i386.h (tc_x86_regname_to_dw2regnum): + Likewise. + * config/tc-m68k.c, config/tc-m68k.h (tc_m68k_regname_to_dw2regnum): + Likewise. + * config/tc-ppc.c, config/tc-ppc.h (tc_ppc_regname_to_dw2regnum): + Likewise. + * config/tc-s390.c, config/tc-s390.h (tc_s390_regname_to_dw2regnum): + Likewise. + * config/tc-sh.c, config/tc-sh.h (sh_regname_to_dw2regnum): + Likewise. + * config/tc-sparc.c, config/tc-sparc.h (sparc_regname_to_dw2regnum): + Likewise. + 2006-05-19 Nathan Sidwell * gas/config/tc-m68k.c (m68k_init_arch): Move checking of diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index a63b3da051..375064c4aa 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -15601,9 +15601,9 @@ create_unwind_entry (int have_data) /* Convert REGNAME to a DWARF-2 register number. */ int -tc_arm_regname_to_dw2regnum (const char *regname) +tc_arm_regname_to_dw2regnum (char *regname) { - int reg = arm_reg_parse ((char **) ®name, REG_TYPE_RN); + int reg = arm_reg_parse (®name, REG_TYPE_RN); if (reg == FAIL) return -1; diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index f2615770c4..3f0abc84dd 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -244,5 +244,5 @@ extern void arm_init_frag (struct frag *); extern void arm_handle_align (struct frag *); extern bfd_boolean arm_fix_adjustable (struct fix *); extern int arm_elf_section_type (const char *, size_t); -extern int tc_arm_regname_to_dw2regnum (const char *regname); +extern int tc_arm_regname_to_dw2regnum (char *regname); extern void tc_arm_frame_initial_instructions (void); diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 8ceccbcb83..694618f06c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7173,7 +7173,7 @@ intel_putback_token () } int -tc_x86_regname_to_dw2regnum (const char *regname) +tc_x86_regname_to_dw2regnum (char *regname) { unsigned int regnum; unsigned int regnames_count; diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 98517041da..312b8cdf0f 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -488,7 +488,7 @@ extern int x86_cie_data_alignment; #define DWARF2_CIE_DATA_ALIGNMENT x86_cie_data_alignment #define tc_regname_to_dw2regnum tc_x86_regname_to_dw2regnum -extern int tc_x86_regname_to_dw2regnum PARAMS ((const char *regname)); +extern int tc_x86_regname_to_dw2regnum PARAMS ((char *regname)); #define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions extern void tc_x86_frame_initial_instructions PARAMS ((void)); diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 6cf85d7e60..3f4382e14f 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -7562,7 +7562,7 @@ m68k_elf_final_processing (void) #endif int -tc_m68k_regname_to_dw2regnum (const char *regname) +tc_m68k_regname_to_dw2regnum (char *regname) { unsigned int regnum; static const char *const regnames[] = diff --git a/gas/config/tc-m68k.h b/gas/config/tc-m68k.h index fc05a9264e..f1464fdbfc 100644 --- a/gas/config/tc-m68k.h +++ b/gas/config/tc-m68k.h @@ -174,7 +174,7 @@ extern struct relax_type md_relax_table[]; #define DWARF2_CIE_DATA_ALIGNMENT (-4) #define tc_regname_to_dw2regnum tc_m68k_regname_to_dw2regnum -extern int tc_m68k_regname_to_dw2regnum (const char *regname); +extern int tc_m68k_regname_to_dw2regnum (char *regname); #define tc_cfi_frame_initial_instructions tc_m68k_frame_initial_instructions extern void tc_m68k_frame_initial_instructions (void); diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index d5bdb9e643..3a7552bf95 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -6078,7 +6078,7 @@ ppc_cfi_frame_initial_instructions () } int -tc_ppc_regname_to_dw2regnum (const char *regname) +tc_ppc_regname_to_dw2regnum (char *regname) { unsigned int regnum = -1; unsigned int i; diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h index f7c2da619c..5a43420b7b 100644 --- a/gas/config/tc-ppc.h +++ b/gas/config/tc-ppc.h @@ -259,7 +259,7 @@ extern int ppc_parse_name PARAMS ((const char *, struct expressionS *)); extern void ppc_cfi_frame_initial_instructions PARAMS ((void)); #define tc_regname_to_dw2regnum tc_ppc_regname_to_dw2regnum -extern int tc_ppc_regname_to_dw2regnum PARAMS ((const char *regname)); +extern int tc_ppc_regname_to_dw2regnum PARAMS ((char *regname)); extern int ppc_cie_data_alignment; diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 56b5b2594f..a308ca253a 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -2322,7 +2322,7 @@ s390_cfi_frame_initial_instructions () } int -tc_s390_regname_to_dw2regnum (const char *regname) +tc_s390_regname_to_dw2regnum (char *regname) { int regnum = -1; diff --git a/gas/config/tc-s390.h b/gas/config/tc-s390.h index dbecfef3a5..b387c3b867 100644 --- a/gas/config/tc-s390.h +++ b/gas/config/tc-s390.h @@ -88,7 +88,7 @@ extern void s390_md_end PARAMS ((void)); extern void s390_cfi_frame_initial_instructions PARAMS ((void)); #define tc_regname_to_dw2regnum tc_s390_regname_to_dw2regnum -extern int tc_s390_regname_to_dw2regnum PARAMS ((const char *regname)); +extern int tc_s390_regname_to_dw2regnum PARAMS ((char *regname)); extern int s390_cie_data_alignment; diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index fa352d6e5f..fa2e75ada2 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -4382,7 +4382,7 @@ sh_cfi_frame_initial_instructions (void) } int -sh_regname_to_dw2regnum (const char *regname) +sh_regname_to_dw2regnum (char *regname) { unsigned int regnum = -1; unsigned int i; diff --git a/gas/config/tc-sh.h b/gas/config/tc-sh.h index a812036fcd..412875c34f 100644 --- a/gas/config/tc-sh.h +++ b/gas/config/tc-sh.h @@ -225,7 +225,7 @@ void sh_cons_fix_new (fragS *, int, int, expressionS *); extern void sh_cfi_frame_initial_instructions (void); #define tc_regname_to_dw2regnum sh_regname_to_dw2regnum -extern int sh_regname_to_dw2regnum (const char *regname); +extern int sh_regname_to_dw2regnum (char *regname); /* All SH instructions are multiples of 16 bits. */ #define DWARF2_LINE_MIN_INSN_LENGTH 2 diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index 10a1411b52..b9a3025ab6 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -4602,7 +4602,7 @@ sparc_cfi_frame_initial_instructions () } int -sparc_regname_to_dw2regnum (const char *regname) +sparc_regname_to_dw2regnum (char *regname) { char *p, *q; diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h index 14da16ad62..3feac4f362 100644 --- a/gas/config/tc-sparc.h +++ b/gas/config/tc-sparc.h @@ -171,7 +171,7 @@ extern void cons_fix_new_sparc extern void sparc_cfi_frame_initial_instructions PARAMS ((void)); #define tc_regname_to_dw2regnum sparc_regname_to_dw2regnum -extern int sparc_regname_to_dw2regnum PARAMS ((const char *regname)); +extern int sparc_regname_to_dw2regnum PARAMS ((char *regname)); #define tc_cfi_emit_pcrel_expr sparc_cfi_emit_pcrel_expr extern void sparc_cfi_emit_pcrel_expr PARAMS ((expressionS *, unsigned int));