This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [RFA] Fix warnings for d10v-elf
- To: ac131313 at cygnus dot com
- Subject: Re: [RFA] Fix warnings for d10v-elf
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Wed, 12 Apr 2000 10:59:38 -0700
- CC: binutils at sourceware dot cygnus dot com
Hi Andrew, Hi Ian,
: The declaration needs ``struct fix''. I changed the definition to match
: the declaration for consistency.
:
: Using ``struct fix'' in the declaration is a hack due to header file
: ordering. Don't change the definition to match it. Fix the header
: files so that fixS works, or don't worry about it.
:
: We should try very hard to avoid referring to the same struct under
: different names in the actual code. That can only cause confusion to
: no benefit.
OK - so I have revised Andrew's original patch (see below) so that
both tc-d10.h and tc-d10v.c use fixS consitently. I will check this
version of the patch in.
Cheers
Nick
Sun Apr 9 22:32:17 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config/tc-d10v.h: Include "write.h" to get definition of fixS.
(md_pcrel_from_section): Add prototype.
(d10v_fix_adjustable): Add prototype.
(d10v_force_relocation): Replace 'struct fix' with 'fixS'.
* config/tc-d10v.c (md_apply_fix3): Add paren around &&.
Index: config/tc-d10v.h
===================================================================
RCS file: /cvs/src//src/gas/config/tc-d10v.h,v
retrieving revision 1.2
diff -p -r1.2 tc-d10v.h
*** tc-d10v.h 2000/04/01 00:19:46 1.2
--- tc-d10v.h 2000/04/12 17:54:27
***************
*** 19,24 ****
--- 19,26 ----
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+ #include "write.h" /* For the definition of fixS. */
+
#define TC_D10V
#define TARGET_BYTES_BIG_ENDIAN 0
***************
*** 36,41 ****
--- 38,44 ----
/* call md_pcrel_from_section, not md_pcrel_from */
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
+ long md_pcrel_from_section PARAMS ((fixS *, segT));
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1
*************** int d10v_cleanup PARAMS ((void));
*** 57,63 ****
} while (0)
#define obj_fix_adjustable(fixP) d10v_fix_adjustable(fixP)
#define TC_FORCE_RELOCATION(fixp) d10v_force_relocation(fixp)
! extern int d10v_force_relocation PARAMS ((struct fix *));
#define md_flush_pending_output d10v_cleanup
--- 60,67 ----
} while (0)
#define obj_fix_adjustable(fixP) d10v_fix_adjustable(fixP)
+ boolean d10v_fix_adjustable PARAMS ((fixS *));
#define TC_FORCE_RELOCATION(fixp) d10v_force_relocation(fixp)
! extern int d10v_force_relocation PARAMS ((fixS *));
#define md_flush_pending_output d10v_cleanup
Index: config/tc-d10v.c
===================================================================
RCS file: /cvs/src//src/gas/config/tc-d10v.c,v
retrieving revision 1.8
diff -p -r1.8 tc-d10v.c
*** tc-d10v.c 2000/02/18 18:45:28 1.8
--- tc-d10v.c 2000/04/12 17:54:27
*************** md_apply_fix3 (fixp, valuep, seg)
*** 1518,1525 ****
rep = (struct d10v_opcode *) hash_find (d10v_hash, "rep");
repi = (struct d10v_opcode *) hash_find (d10v_hash, "repi");
if ((insn & FM11) == FM11
! && (repi != NULL && (insn & repi->mask) == repi->opcode
! || rep != NULL && (insn & rep->mask) == rep->opcode)
&& value < 4)
as_fatal
(_("line %d: rep or repi must include at least 4 instructions"),
--- 1518,1525 ----
rep = (struct d10v_opcode *) hash_find (d10v_hash, "rep");
repi = (struct d10v_opcode *) hash_find (d10v_hash, "repi");
if ((insn & FM11) == FM11
! && ((repi != NULL && (insn & repi->mask) == repi->opcode)
! || (rep != NULL && (insn & rep->mask) == rep->opcode))
&& value < 4)
as_fatal
(_("line %d: rep or repi must include at least 4 instructions"),