* [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values
@ 2014-03-07 19:15 Stefan Weil
2014-03-07 19:42 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2014-03-07 19:15 UTC (permalink / raw)
To: qemu-trivial; +Cc: Peter Maydell, qemu-devel, Stefan Weil
"%d" or "%x" won't work on hosts where int values are smaller than 64 bit.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/disas/libvixl/a64/disasm-a64.cc b/disas/libvixl/a64/disasm-a64.cc
index 5c6b898..5f172da 100644
--- a/disas/libvixl/a64/disasm-a64.cc
+++ b/disas/libvixl/a64/disasm-a64.cc
@@ -1342,7 +1342,7 @@ int Disassembler::SubstituteImmediateField(Instruction* instr,
ASSERT(format[5] == 'L');
AppendToOutput("#0x%" PRIx64, instr->ImmMoveWide());
if (instr->ShiftMoveWide() > 0) {
- AppendToOutput(", lsl #%d", 16 * instr->ShiftMoveWide());
+ AppendToOutput(", lsl #%" PRId64, 16 * instr->ShiftMoveWide());
}
}
return 8;
@@ -1391,7 +1391,7 @@ int Disassembler::SubstituteImmediateField(Instruction* instr,
}
case 'F': { // IFPSingle, IFPDouble or IFPFBits.
if (format[3] == 'F') { // IFPFbits.
- AppendToOutput("#%d", 64 - instr->FPScale());
+ AppendToOutput("#%" PRId64, 64 - instr->FPScale());
return 8;
} else {
AppendToOutput("#0x%" PRIx64 " (%.4f)", instr->ImmFP(),
@@ -1412,23 +1412,23 @@ int Disassembler::SubstituteImmediateField(Instruction* instr,
return 5;
}
case 'P': { // IP - Conditional compare.
- AppendToOutput("#%d", instr->ImmCondCmp());
+ AppendToOutput("#%" PRId64, instr->ImmCondCmp());
return 2;
}
case 'B': { // Bitfields.
return SubstituteBitfieldImmediateField(instr, format);
}
case 'E': { // IExtract.
- AppendToOutput("#%d", instr->ImmS());
+ AppendToOutput("#%" PRId64, instr->ImmS());
return 8;
}
case 'S': { // IS - Test and branch bit.
- AppendToOutput("#%d", (instr->ImmTestBranchBit5() << 5) |
- instr->ImmTestBranchBit40());
+ AppendToOutput("#%" PRId64, (instr->ImmTestBranchBit5() << 5) |
+ instr->ImmTestBranchBit40());
return 2;
}
case 'D': { // IDebug - HLT and BRK instructions.
- AppendToOutput("#0x%x", instr->ImmException());
+ AppendToOutput("#0x%" PRIx64, instr->ImmException());
return 6;
}
default: {
@@ -1598,12 +1598,12 @@ int Disassembler::SubstituteExtendField(Instruction* instr,
(((instr->ExtendMode() == UXTW) && (instr->SixtyFourBits() == 0)) ||
(instr->ExtendMode() == UXTX))) {
if (instr->ImmExtendShift() > 0) {
- AppendToOutput(", lsl #%d", instr->ImmExtendShift());
+ AppendToOutput(", lsl #%" PRId64, instr->ImmExtendShift());
}
} else {
AppendToOutput(", %s", extend_mode[instr->ExtendMode()]);
if (instr->ImmExtendShift() > 0) {
- AppendToOutput(" #%d", instr->ImmExtendShift());
+ AppendToOutput(" #%" PRId64, instr->ImmExtendShift());
}
}
return 3;
@@ -1632,7 +1632,7 @@ int Disassembler::SubstituteLSRegOffsetField(Instruction* instr,
if (!((ext == UXTX) && (shift == 0))) {
AppendToOutput(", %s", extend_mode[ext]);
if (shift != 0) {
- AppendToOutput(" #%d", instr->SizeLS());
+ AppendToOutput(" #%" PRId64, instr->SizeLS());
}
}
return 9;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values
2014-03-07 19:15 [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values Stefan Weil
@ 2014-03-07 19:42 ` Andreas Färber
2014-03-07 20:01 ` Stefan Weil
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2014-03-07 19:42 UTC (permalink / raw)
To: Stefan Weil, qemu-trivial; +Cc: Peter Maydell, qemu-devel
Am 07.03.2014 20:15, schrieb Stefan Weil:
> "%d" or "%x" won't work on hosts where int values are smaller than 64 bit.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
Patch looks correct, but I see no indication that this is a backport
from upstream libvixl. Have you submitted it there too?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values
2014-03-07 19:42 ` Andreas Färber
@ 2014-03-07 20:01 ` Stefan Weil
2014-03-07 22:01 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2014-03-07 20:01 UTC (permalink / raw)
To: Andreas Färber, qemu-trivial; +Cc: Peter Maydell, qemu-devel
Am 07.03.2014 20:42, schrieb Andreas Färber:
> Am 07.03.2014 20:15, schrieb Stefan Weil:
>> "%d" or "%x" won't work on hosts where int values are smaller than 64 bit.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>> disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> Patch looks correct, but I see no indication that this is a backport
> from upstream libvixl. Have you submitted it there too?
>
> Regards,
> Andreas
If I knew how to submit it to libvixl, I'd have done that already. I did
not find any hint (e-mail address, keyword contrib) in the sources from
github. Can you help me? It would also be fine if someone just takes my
patch and applies it there.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values
2014-03-07 20:01 ` Stefan Weil
@ 2014-03-07 22:01 ` Andreas Färber
2014-03-10 14:20 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2014-03-07 22:01 UTC (permalink / raw)
To: Stefan Weil, qemu-trivial; +Cc: Peter Maydell, qemu-devel
Am 07.03.2014 21:01, schrieb Stefan Weil:
> Am 07.03.2014 20:42, schrieb Andreas Färber:
>> Am 07.03.2014 20:15, schrieb Stefan Weil:
>>> "%d" or "%x" won't work on hosts where int values are smaller than 64 bit.
>>>
>>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>>> ---
>>> disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++----------
>>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> Patch looks correct, but I see no indication that this is a backport
>> from upstream libvixl. Have you submitted it there too?
>
> If I knew how to submit it to libvixl, I'd have done that already. I did
> not find any hint (e-mail address, keyword contrib) in the sources from
> github. Can you help me?
Google led me to the following:
https://github.com/armvixl/vixl
vixl@arm.com
> It would also be fine if someone just takes my
> patch and applies it there.
Hopefully Peter can help; I just remembered someone asking not to apply
spelling fixes to not complicate functional backports.
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values
2014-03-07 22:01 ` Andreas Färber
@ 2014-03-10 14:20 ` Peter Maydell
0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2014-03-10 14:20 UTC (permalink / raw)
To: Andreas Färber; +Cc: QEMU Trivial, Stefan Weil, QEMU Developers
On 7 March 2014 22:01, Andreas Färber <afaerber@suse.de> wrote:
> Am 07.03.2014 21:01, schrieb Stefan Weil:
>> Am 07.03.2014 20:42, schrieb Andreas Färber:
>>> Am 07.03.2014 20:15, schrieb Stefan Weil:
>>>> "%d" or "%x" won't work on hosts where int values are smaller than 64 bit.
>>>>
>>>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>>>> ---
>>>> disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++----------
>>>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>>
>>> Patch looks correct, but I see no indication that this is a backport
>>> from upstream libvixl. Have you submitted it there too?
>>
>> If I knew how to submit it to libvixl, I'd have done that already. I did
>> not find any hint (e-mail address, keyword contrib) in the sources from
>> github. Can you help me?
>
> Google led me to the following:
> https://github.com/armvixl/vixl
>
> vixl@arm.com
This is the right email address and git repo, yes.
(our disas/libvixl/README gives the github URL, at least.)
I would encourage you to email them patches, it will
act as a prod for them to get themselves set up to
handle incoming contributions properly :-)
>> It would also be fine if someone just takes my
>> patch and applies it there.
>
> Hopefully Peter can help; I just remembered someone asking not to apply
> spelling fixes to not complicate functional backports.
I will apply this patch to target-arm.next. I'm happy
that we carry genuine bugfixes to libvixl (hopefully
in anticipation of them going away on a future update),
it's only non-functional changes I'd rather we don't
carry in our tree.
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-10 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 19:15 [Qemu-devel] [PATCH] libvixl: Fix format strings for several int64_t values Stefan Weil
2014-03-07 19:42 ` Andreas Färber
2014-03-07 20:01 ` Stefan Weil
2014-03-07 22:01 ` Andreas Färber
2014-03-10 14:20 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).