Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=74ccbdc226cac44bb56cd479917195dc5132d7aa
Commit:     74ccbdc226cac44bb56cd479917195dc5132d7aa
Parent:     076fc808ab804c6cfb40fd0caa0b74dd50e0d5de
Author:     Martin Schwidefsky <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 16:11:33 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 16:13:06 2007 +0200

    [S390] disassembler: fix output for insns with 6 operands.
    
    The termination condition of the loop that prints the operands of
    an instruction doesn't stop after the maximum of 6 operands.
    It continues with the operands of the next instruction format
    instead which create really long lines.
    
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/kernel/dis.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index 50d2235..5f315af 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -1162,6 +1162,7 @@ static int print_insn(char *buffer, unsigned char *code, 
unsigned long addr)
        unsigned int value;
        char separator;
        char *ptr;
+       int i;
 
        ptr = buffer;
        insn = find_insn(code);
@@ -1169,7 +1170,8 @@ static int print_insn(char *buffer, unsigned char *code, 
unsigned long addr)
                ptr += sprintf(ptr, "%.5s\t", insn->name);
                /* Extract the operands. */
                separator = 0;
-               for (ops = formats[insn->format] + 1; *ops != 0; ops++) {
+               for (ops = formats[insn->format] + 1, i = 0;
+                    *ops != 0 && i < 6; ops++, i++) {
                        operand = operands + *ops;
                        value = extract_operand(code, operand);
                        if ((operand->flags & OPERAND_INDEX)  && value == 0)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to