This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

proposed patch for opcodes/cgen-asm.in




this fixes a bug where the instruction insert failed (for whatever reason),
leaving tmp_errmsg `NULL', but later on in @arch@_cgen_assemble_insn(),
it will pass this NULl tmp_errmsg to sprintf().


is this OK?  would someone please commit it if so?


2000-08-02  matthew green  <mrg@redhat.com>

	* cgen-asm.in (@arch@_cgen_assemble_insn): Don't leave tmp_errmsg
	NULL when continuing instruction parsing.


Index: opcodes/cgen-asm.in
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/cgen-asm.in,v
retrieving revision 1.25
diff -p -r1.25 cgen-asm.in
*** cgen-asm.in	2000/07/21 09:48:11	1.25
--- cgen-asm.in	2000/08/02 06:32:19
*************** const CGEN_INSN *
*** 240,246 ****
  	  /* ??? 0 is passed for `pc' */
  	  if (CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, (bfd_vma) 0)
  	      != NULL)
! 	    continue;
  	  /* It is up to the caller to actually output the insn and any
  	     queued relocs.  */
  	  return insn;
--- 240,249 ----
  	  /* ??? 0 is passed for `pc' */
  	  if (CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, (bfd_vma) 0)
  	      != NULL)
! 	    {
! 	      tmp_errmsg = "instruction insert failed";
! 	      continue;
! 	    }
  	  /* It is up to the caller to actually output the insn and any
  	     queued relocs.  */
  	  return insn;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]