Commit ee8479bb authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/dis: use correct escape sequence for '%' character

The double escape character sequence introduced with commit
272fa59c ("s390/dis: Fix handling of format specifiers") is not
necessary anymore since commit 561e1030 ("s390/dis: Fix printing
of the register numbers").

Instead this now generates an extra '%' character:

lg      %%r1,160(%%r11)

So fix this and basically revert 272fa59c.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 443a8133
...@@ -1920,23 +1920,16 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) ...@@ -1920,23 +1920,16 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
} }
if (separator) if (separator)
ptr += sprintf(ptr, "%c", separator); ptr += sprintf(ptr, "%c", separator);
/*
* Use four '%' characters below because of the
* following two conversions:
*
* 1) sprintf: %%%%r -> %%r
* 2) printk : %%r -> %r
*/
if (operand->flags & OPERAND_GPR) if (operand->flags & OPERAND_GPR)
ptr += sprintf(ptr, "%%%%r%i", value); ptr += sprintf(ptr, "%%r%i", value);
else if (operand->flags & OPERAND_FPR) else if (operand->flags & OPERAND_FPR)
ptr += sprintf(ptr, "%%%%f%i", value); ptr += sprintf(ptr, "%%f%i", value);
else if (operand->flags & OPERAND_AR) else if (operand->flags & OPERAND_AR)
ptr += sprintf(ptr, "%%%%a%i", value); ptr += sprintf(ptr, "%%a%i", value);
else if (operand->flags & OPERAND_CR) else if (operand->flags & OPERAND_CR)
ptr += sprintf(ptr, "%%%%c%i", value); ptr += sprintf(ptr, "%%c%i", value);
else if (operand->flags & OPERAND_VR) else if (operand->flags & OPERAND_VR)
ptr += sprintf(ptr, "%%%%v%i", value); ptr += sprintf(ptr, "%%v%i", value);
else if (operand->flags & OPERAND_PCREL) else if (operand->flags & OPERAND_PCREL)
ptr += sprintf(ptr, "%lx", (signed int) value ptr += sprintf(ptr, "%lx", (signed int) value
+ addr); + addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment