diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-20 01:13:05 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-31 07:29:00 -0400 |
commit | f854977c2364fb17ba20e6a505f5d78f2c645679 (patch) | |
tree | b1119993e8d37e7a105940de422d6aa797ac3ce7 | |
parent | 97830986a14b00011755d26469889a6627378ced (diff) | |
download | gdb-f854977c2364fb17ba20e6a505f5d78f2c645679.zip gdb-f854977c2364fb17ba20e6a505f5d78f2c645679.tar.gz gdb-f854977c2364fb17ba20e6a505f5d78f2c645679.tar.bz2 |
cast the arg to md_assemble () to char *
For these targets its not clear how md_assemble can usefully be split up so
that part can take const char *. There is also a fair number of targets that
need md_assemble () to take a char *, so we can't easily make the argument
const. So since there isn't many callers it seems easiest to just add a couple
of casts.
gas/ChangeLog:
2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-m32c.c (m32c_md_end): cast the argument to md_assemble to
char *.
(m32c_indirect_operand): Likewise.
* config/tc-nds32.c (do_pseudo_b): Likewise.
(do_pseudo_bal): Likewise.
(do_pseudo_ls_bhw): Likewise.
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-m32c.c | 8 | ||||
-rw-r--r-- | gas/config/tc-nds32.c | 10 |
3 files changed, 18 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ffb04fd..ba3eeab 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,14 @@ 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + * config/tc-m32c.c (m32c_md_end): cast the argument to md_assemble to + char *. + (m32c_indirect_operand): Likewise. + * config/tc-nds32.c (do_pseudo_b): Likewise. + (do_pseudo_bal): Likewise. + (do_pseudo_ls_bhw): Likewise. + +2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + * as.c (parse_args): Cast literal to char * when assigning to optarg. 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index 4b6e353..5496f7e 100644 --- a/gas/config/tc-m32c.c +++ b/gas/config/tc-m32c.c @@ -200,7 +200,7 @@ m32c_md_end (void) /* Pad with nops for objdump. */ n_nops = (32 - ((insn_size) % 32)) / 8; for (i = 1; i <= n_nops; i++) - md_assemble ("nop"); + md_assemble ((char *) "nop"); } } @@ -317,11 +317,11 @@ m32c_indirect_operand (char *str) } if (indirection[1] != none && indirection[2] != none) - md_assemble ("src-dest-indirect"); + md_assemble ((char *) "src-dest-indirect"); else if (indirection[1] != none) - md_assemble ("src-indirect"); + md_assemble ((char *) "src-indirect"); else if (indirection[2] != none) - md_assemble ("dest-indirect"); + md_assemble ((char *) "dest-indirect"); md_assemble (new_str); free (new_str); diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c index 4c31f43..0d7d346 100644 --- a/gas/config/tc-nds32.c +++ b/gas/config/tc-nds32.c @@ -2202,8 +2202,8 @@ do_pseudo_b (int argc ATTRIBUTE_UNUSED, char *argv[], int pv ATTRIBUTE_UNUSED) { md_assemblef ("sethi $ta,hi20(%s)", arg_label); md_assemblef ("ori $ta,$ta,lo12(%s)", arg_label); - md_assemble ("add $ta,$ta,$gp"); - md_assemble ("jr $ta"); + md_assemble ((char *) "add $ta,$ta,$gp"); + md_assemble ((char *) "jr $ta"); } else { @@ -2223,8 +2223,8 @@ do_pseudo_bal (int argc ATTRIBUTE_UNUSED, char *argv[], int pv ATTRIBUTE_UNUSED) { md_assemblef ("sethi $ta,hi20(%s)", arg_label); md_assemblef ("ori $ta,$ta,lo12(%s)", arg_label); - md_assemble ("add $ta,$ta,$gp"); - md_assemble ("jral $ta"); + md_assemble ((char *) "add $ta,$ta,$gp"); + md_assemble ((char *) "jral $ta"); } else { @@ -2483,7 +2483,7 @@ do_pseudo_ls_bhw (int argc ATTRIBUTE_UNUSED, char *argv[], int pv) /* lw */ md_assemblef ("sethi $ta,hi20(%s)", argv[1]); md_assemblef ("ori $ta,$ta,lo12(%s)", argv[1]); - md_assemble ("lw $ta,[$gp+$ta]"); /* Load address word. */ + md_assemble ((char *) "lw $ta,[$gp+$ta]"); /* Load address word. */ if (addend < 0x10000 && addend >= -0x10000) { md_assemblef ("%c%c%si %s,[$ta+(%d)]", ls, size, sign, argv[0], addend); |