This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] fix ppc disassembly of condition registers
- From: Segher Boessenkool <segher at koffie dot nl>
- To: binutils at sources dot redhat dot com
- Date: Tue, 12 Nov 2002 02:58:52 +0100
- Subject: [PATCH] fix ppc disassembly of condition registers
For some reason the "lt" register was omitted, leading to strange
disassemblies like
crmove ,
which should be
crmove lt,lt
(Or cror 0,0,0 or whatever you prefer. I just took what is closest to
current behaviour).
Please apply.
[I hope my mailer doesn't mangle this...]
2002-11-12 Segher Boessenkool <segher@koffie.nl>
* ppc-dis.c (print_insn_powerpc): Correct condition register display.
*** ppc-dis.c.orig Tue Nov 12 02:14:26 2002
--- ppc-dis.c Tue Nov 12 02:19:43 2002
*************** print_insn_powerpc (memaddr, info, bigen
*** 236,249 ****
cr = value >> 2;
if (cr != 0)
! (*info->fprintf_func) (info->stream, "4*cr%d", cr);
cc = value & 3;
! if (cc != 0)
! {
! if (cr != 0)
! (*info->fprintf_func) (info->stream, "+");
! (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
! }
}
}
--- 236,244 ----
cr = value >> 2;
if (cr != 0)
! (*info->fprintf_func) (info->stream, "4*cr%d+", cr);
cc = value & 3;
! (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
}
}