aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-07 15:16:28 +0000
committerNick Clifton <nickc@redhat.com>2016-03-07 15:16:28 +0000
commitf86f586366275bbb5ae77520eb990769f05a3030 (patch)
treec381a61b29516a52e982c2b1d015ce13e88f5f07 /opcodes
parent410d0d5c769ac15c449beb580fb505065630e344 (diff)
downloadgdb-f86f586366275bbb5ae77520eb990769f05a3030.zip
gdb-f86f586366275bbb5ae77520eb990769f05a3030.tar.gz
gdb-f86f586366275bbb5ae77520eb990769f05a3030.tar.bz2
Add const qualifiers at various places.
opcodes * mcore-opc.h: Add const qualifiers. * microblaze-opc.h (struct op_code_struct): Likewise. * sh-opc.h: Likewise. * tic4x-dis.c (tic4x_print_indirect): Likewise. (tic4x_print_op): Likewise. include * opcode/dlx.h (struct dlx_opcode): Add const qualifiers. * opcode/h8300.h (struct h8_opcode): Likewise. * opcode/hppa.h (struct pa_opcode): Likewise. * opcode/msp430.h: Likewise. * opcode/spu.h (struct spu_opcode): Likewise. * opcode/tic30.h (struct _register): Likewise. * opcode/tic4x.h (struct tic4x_register): Likewise. (struct tic4x_cond): Likewise. (struct tic4x_indirect): Likewise. (struct tic4x_inst): Likewise. * opcode/visium.h (struct reg_entry): Likewise. gas * config/tc-arc.c: Add const qualifiers. * config/tc-h8300.c (md_begin): Likewise. * config/tc-ia64.c (print_prmask): Likewise. * config/tc-msp430.c (msp430_operands): Likewise. * config/tc-nds32.c (struct suffix_name): Likewise. (struct nds32_parse_option_table): Likewise. (struct nds32_set_option_table): Likewise. (do_pseudo_pushpopm): Likewise. (do_pseudo_pushpop_stack): Likewise. (nds32_relax_relocs): Likewise. (nds32_flag): Likewise. (struct nds32_hint_map): Likewise. (nds32_find_reloc_table): Likewise. (nds32_match_hint_insn): Likewise. * config/tc-s390.c: Likewise. * config/tc-sh.c (get_specific): Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic4x.c (tic4x_inst_add): Likewise. (tic4x_indirect_parse): Likewise. * config/tc-vax.c (vax_cons): Likewise. * config/tc-z80.c (struct reg_entry): Likewise. * config/tc-epiphany.c (md_assemble): Adjust. (epiphany_assemble): New function. (epiphany_elf_section_rtn): Call do_align directly. (epiphany_elf_section_text): Likewise. * config/tc-ip2k.c (ip2k_elf_section_rtn): Likewise. (ip2k_elf_section_text): Likewise. * read.c (do_align): Make it not static. * read.h (do_align): New prototype.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog8
-rw-r--r--opcodes/mcore-opc.h2
-rw-r--r--opcodes/microblaze-opc.h2
-rw-r--r--opcodes/sh-opc.h2
-rw-r--r--opcodes/tic4x-dis.c8
5 files changed, 15 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f2a9c26..09fd66f 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,11 @@
+2016-03-07 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * mcore-opc.h: Add const qualifiers.
+ * microblaze-opc.h (struct op_code_struct): Likewise.
+ * sh-opc.h: Likewise.
+ * tic4x-dis.c (tic4x_print_indirect): Likewise.
+ (tic4x_print_op): Likewise.
+
2016-03-02 Alan Modra <amodra@gmail.com>
* or1k-desc.h: Regenerate.
diff --git a/opcodes/mcore-opc.h b/opcodes/mcore-opc.h
index c94ab2f..24c3f88 100644
--- a/opcodes/mcore-opc.h
+++ b/opcodes/mcore-opc.h
@@ -33,7 +33,7 @@ mcore_opclass;
typedef struct inst
{
- char * name;
+ const char * name;
mcore_opclass opclass;
unsigned char transfer;
unsigned short inst;
diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
index 4fbd8e2..a1bc3d0 100644
--- a/opcodes/microblaze-opc.h
+++ b/opcodes/microblaze-opc.h
@@ -105,7 +105,7 @@
struct op_code_struct
{
- char * name;
+ const char * name;
short inst_type; /* Registers and immediate values involved. */
short inst_offset_type; /* Immediate vals offset from PC? (= 1 for branches). */
short delay_slots; /* Info about delay slots needed after this instr. */
diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h
index 5916c6a..b2bbbfd 100644
--- a/opcodes/sh-opc.h
+++ b/opcodes/sh-opc.h
@@ -371,7 +371,7 @@ SH4AL-dsp SH4A
typedef struct
{
- char *name;
+ const char *name;
sh_arg_type arg[4];
sh_nibble_type nibbles[9];
unsigned int arch;
diff --git a/opcodes/tic4x-dis.c b/opcodes/tic4x-dis.c
index 388e2a9..c35e050 100644
--- a/opcodes/tic4x-dis.c
+++ b/opcodes/tic4x-dis.c
@@ -120,7 +120,7 @@ tic4x_print_char (struct disassemble_info * info, char ch)
}
static int
-tic4x_print_str (struct disassemble_info *info, char *str)
+tic4x_print_str (struct disassemble_info *info, const char *str)
{
if (info != NULL)
(*info->fprintf_func) (info->stream, "%s", str);
@@ -294,7 +294,7 @@ tic4x_print_indirect (struct disassemble_info *info,
unsigned int aregno;
unsigned int modn;
unsigned int disp;
- char *a;
+ const char *a;
aregno = 0;
modn = 0;
@@ -357,8 +357,8 @@ tic4x_print_op (struct disassemble_info *info,
unsigned long pc)
{
int val;
- char *s;
- char *parallel = NULL;
+ const char *s;
+ const char *parallel = NULL;
/* Print instruction name. */
s = p->name;