This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Fix d10v-dis.c for 64bit host
On Fri, May 06, 2005 at 05:30:49PM -0700, H. J. Lu wrote:
> On Fri, May 06, 2005 at 04:20:16PM -0700, Eric Christopher wrote:
> > On Fri, 2005-05-06 at 16:18 -0700, H. J. Lu wrote:
> > > On Fri, May 06, 2005 at 04:07:25PM -0700, Eric Christopher wrote:
> > > > On Fri, 2005-05-06 at 15:53 -0700, H. J. Lu wrote:
> > > > > get_special_section scans the whole array for a match. This patch
> > > > > reduces the number of searches.
> > > >
> > > > And you tested by... ? :)
> > > >
> > >
> > > I run profiling on sec64k.exp. Old:
> >
> > Nice, I'd meant something like:
> >
> > "--enable-targets=all and make check with no regressions" also :)
> >
>
> It won't build:
>
> /net/gnu/export/gnu/src/binutils/binutils/opcodes/d10v-dis.c: In
> function `dis_2_short':
> /net/gnu/export/gnu/src/binutils/binutils/opcodes/d10v-dis.c:256:
> warning: comparison between signed and unsigned
>
> on Linux/x86_64. It works on ia32, ia64 and x86_64.
>
>
With this patch, --enable-targets=all is OK on Linux/x86_64.
H.J.
----
2005-05-06 H.J. Lu <hongjiu.lu@intel.com>
* d10v-dis.c (dis_2_short): Support 64bit host.
--- opcodes/d10v-dis.c.int 2001-12-04 04:30:55.000000000 -0800
+++ opcodes/d10v-dis.c 2005-05-06 17:43:32.000000000 -0700
@@ -253,7 +253,8 @@ dis_2_short (insn, memaddr, info, order)
while (op->name)
{
if ((op->format & SHORT_OPCODE)
- && ((op->mask & ins[j]) == (unsigned long) op->opcode))
+ && ((((unsigned int) op->mask) & ins[j])
+ == (unsigned int) op->opcode))
{
(*info->fprintf_func) (info->stream, "%s\t", op->name);
for (i = 0; op->operands[i]; i++)