diff options
author | Martin Hunt <hunt@redhat.com> | 1996-12-06 09:13:25 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1996-12-06 09:13:25 +0000 |
commit | f787a8d9b82b70d212d5523d8b4f8b5968d7a64b (patch) | |
tree | 695296376d74afbf14631d4b3860c815e91b0299 | |
parent | e5a7a537994e55e7c881fd79359566b1ab58f34a (diff) | |
download | gdb-f787a8d9b82b70d212d5523d8b4f8b5968d7a64b.zip gdb-f787a8d9b82b70d212d5523d8b4f8b5968d7a64b.tar.gz gdb-f787a8d9b82b70d212d5523d8b4f8b5968d7a64b.tar.bz2 |
Fri Dec 6 00:55:48 1996 Martin <hunt@cygnus.com>
* config/tc-d10v.c (md_assemble): Check to see if prev_seg
is initialized before using it.
(d10v_cleanup): No longer uses its argument, so make it void.
* config/tc-d10v.h (d10v_cleanup): Change prototype.
-rw-r--r-- | gas/ChangeLog | 11 | ||||
-rw-r--r-- | gas/config/tc-d10v.c | 15 |
2 files changed, 15 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2324269..6d8e2f0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,8 +1,13 @@ -Thu Dec 5 23:44:42 1996 Michael Meissner <meissner@tiktok.cygnus.com> +start-sanitize-d10v +Fri Dec 6 00:55:48 1996 Martin <hunt@cygnus.com> - * config/tc-ppc.c (comment_char): Correctly define for non ELF - systems. + * config/tc-d10v.c (md_assemble): Check to see if prev_seg + is initialized before using it. + (d10v_cleanup): No longer uses its argument, so make it void. + * config/tc-d10v.h (d10v_cleanup): Change prototype. + +end-sanitize-d10v Thu Dec 5 11:03:31 1996 Ian Lance Taylor <ian@cygnus.com> * write.c (fixup_segment): Don't discard the symbol for a PC diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index 1bd9deb..fc143be 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -905,7 +905,7 @@ parallel_ok (op1, insn1, op2, insn2, exec_type) static unsigned long prev_insn; static struct d10v_opcode *prev_opcode = 0; static subsegT prev_subseg; -static segT prev_seg; +static segT prev_seg = 0;; void md_assemble (str) @@ -942,7 +942,7 @@ md_assemble (str) /* if two instructions are present and we already have one saved then first write it out */ - d10v_cleanup(0); + d10v_cleanup(); /* assemble first instruction and save it */ prev_insn = do_assemble (str, &prev_opcode); @@ -975,15 +975,15 @@ md_assemble (str) { if (extype) as_fatal("Unable to mix instructions as specified"); - d10v_cleanup(0); + d10v_cleanup(); write_long (opcode, insn, fixups); prev_opcode = NULL; return; } - if (prev_opcode && ((prev_seg != now_seg) || (prev_subseg != now_subseg))) - d10v_cleanup(0); - + if (prev_opcode && prev_seg && ((prev_seg != now_seg) || (prev_subseg != now_subseg))) + d10v_cleanup(); + if (prev_opcode && (write_2_short (prev_opcode, prev_insn, opcode, insn, extype, fixups) == 0)) { /* no instructions saved */ @@ -1355,8 +1355,7 @@ md_apply_fix3 (fixp, valuep, seg) instructions to see if it can package them with the next instruction, there may be a short instruction that still needs written. */ int -d10v_cleanup (done) - int done; +d10v_cleanup () { segT seg; subsegT subseg; |