* Re: [PATCH]: Add format attributes and fix exposed bugs
[not found] ` <200507071426.j67EQptX019240@caipclassic.rutgers.edu>
@ 2005-07-14 13:20 ` Alan Modra
2005-07-15 0:58 ` Frank Ch. Eigler
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2005-07-14 13:20 UTC (permalink / raw)
To: cgen; +Cc: binutils, Kaveh R. Ghazi
On Thu, Jul 07, 2005 at 10:26:51AM -0400, Kaveh R. Ghazi wrote:
> opcodes:
> * arc-dis.c, arm-dis.c, cris-dis.c, crx-dis.c, d10v-dis.c,
> d30v-dis.c, fr30-dis.c, h8300-dis.c, h8500-dis.c, i860-dis.c,
> ia64-dis.c, ip2k-dis.c, m10200-dis.c, m10300-dis.c,
> m88k-dis.c, mcore-dis.c, mips-dis.c, ms1-dis.c, or32-dis.c,
> ppc-dis.c, sh64-dis.c, sparc-dis.c, tic4x-dis.c, tic80-dis.c,
> v850-dis.c: Fix format bugs.
> * ia64-gen.c (fail, warn): Add format attribute.
> * or32-opc.c (debug): Likewise.
A number of these are generated files. Obvious patch to fix the source
follows. OK to apply?
cgen/
* cpu/fr30.opc (print_register_list): Correct format strings.
* cpu/ip2k.opc: Likewise.
* cpu/ms1.opc: Likewise.
Index: cgen/cpu/fr30.opc
===================================================================
RCS file: /cvs/src/src/cgen/cpu/fr30.opc,v
retrieving revision 1.4
diff -u -p -r1.4 fr30.opc
--- cgen/cpu/fr30.opc 1 Jul 2005 11:16:30 -0000 1.4
+++ cgen/cpu/fr30.opc 14 Jul 2005 10:55:48 -0000
@@ -157,7 +157,7 @@ print_register_list (void * dis_info,
if (value & mask)
{
- (*info->fprintf_func) (info->stream, "r%i", index + offset);
+ (*info->fprintf_func) (info->stream, "r%li", index + offset);
comma = ",";
}
@@ -170,7 +170,7 @@ print_register_list (void * dis_info,
if (value & mask)
{
- (*info->fprintf_func) (info->stream, "%sr%i", comma, index + offset);
+ (*info->fprintf_func) (info->stream, "%sr%li", comma, index + offset);
comma = ",";
}
}
Index: cgen/cpu/ip2k.opc
===================================================================
RCS file: /cvs/src/src/cgen/cpu/ip2k.opc,v
retrieving revision 1.6
diff -u -p -r1.6 ip2k.opc
--- cgen/cpu/ip2k.opc 1 Jul 2005 11:16:30 -0000 1.6
+++ cgen/cpu/ip2k.opc 14 Jul 2005 10:55:48 -0000
@@ -488,7 +488,7 @@ print_fr (CGEN_CPU_DESC cd ATTRIBUTE_UNU
if (offsetvalue == 0)
(*info->fprintf_func) (info->stream, "%s","(DP)");
else
- (*info->fprintf_func) (info->stream, "$%x%s",offsetvalue, "(DP)");
+ (*info->fprintf_func) (info->stream, "$%lx%s", offsetvalue, "(DP)");
return;
}
@@ -498,7 +498,7 @@ print_fr (CGEN_CPU_DESC cd ATTRIBUTE_UNU
if (offsetvalue == 0)
(*info->fprintf_func) (info->stream, "%s", "(SP)");
else
- (*info->fprintf_func) (info->stream, "$%x%s", offsetvalue,"(SP)");
+ (*info->fprintf_func) (info->stream, "$%lx%s", offsetvalue,"(SP)");
return;
}
@@ -509,7 +509,7 @@ print_fr (CGEN_CPU_DESC cd ATTRIBUTE_UNU
(*info->fprintf_func) (info->stream, "%s", ke->name);
else
/* Print as an address literal. */
- (*info->fprintf_func) (info->stream, "$%02x", value);
+ (*info->fprintf_func) (info->stream, "$%02lx", value);
}
static void
@@ -522,7 +522,7 @@ print_dollarhex (CGEN_CPU_DESC cd ATTRIB
{
disassemble_info *info = (disassemble_info *) dis_info;
- (*info->fprintf_func) (info->stream, "$%x", value);
+ (*info->fprintf_func) (info->stream, "$%lx", value);
}
static void
@@ -535,7 +535,7 @@ print_dollarhex8 (CGEN_CPU_DESC cd ATTRI
{
disassemble_info *info = (disassemble_info *) dis_info;
- (*info->fprintf_func) (info->stream, "$%02x", value);
+ (*info->fprintf_func) (info->stream, "$%02lx", value);
}
static void
@@ -552,7 +552,7 @@ print_dollarhex_addr16h (CGEN_CPU_DESC c
by 8 bits so that disassembled code will reassemble properly. */
value = ((value << 8) & 0xFF00);
- (*info->fprintf_func) (info->stream, "$%04x", value);
+ (*info->fprintf_func) (info->stream, "$%04lx", value);
}
static void
@@ -565,7 +565,7 @@ print_dollarhex_addr16l (CGEN_CPU_DESC c
{
disassemble_info *info = (disassemble_info *) dis_info;
- (*info->fprintf_func) (info->stream, "$%04x", value);
+ (*info->fprintf_func) (info->stream, "$%04lx", value);
}
static void
@@ -580,7 +580,7 @@ print_dollarhex_p (CGEN_CPU_DESC cd ATTR
value = ((value << 14) & 0x1C000);
;value = (value & 0x1FFFF);
- (*info->fprintf_func) (info->stream, "$%05x", value);
+ (*info->fprintf_func) (info->stream, "$%05lx", value);
}
static void
@@ -594,7 +594,7 @@ print_dollarhex_cj (CGEN_CPU_DESC cd ATT
disassemble_info *info = (disassemble_info *) dis_info;
value = ((value << 1) & 0x1FFFF);
- (*info->fprintf_func) (info->stream, "$%05x", value);
+ (*info->fprintf_func) (info->stream, "$%05lx", value);
}
static void
@@ -607,7 +607,7 @@ print_decimal (CGEN_CPU_DESC cd ATTRIBUT
{
disassemble_info *info = (disassemble_info *) dis_info;
- (*info->fprintf_func) (info->stream, "%d", value);
+ (*info->fprintf_func) (info->stream, "%ld", value);
}
Index: cpu/ms1.opc
===================================================================
RCS file: /cvs/src/src/cpu/ms1.opc,v
retrieving revision 1.2
diff -u -p -r1.2 ms1.opc
--- cpu/ms1.opc 5 Jul 2005 15:07:45 -0000 1.2
+++ cpu/ms1.opc 14 Jul 2005 10:55:48 -0000
@@ -422,7 +422,7 @@ print_dollarhex (CGEN_CPU_DESC cd ATTRIB
{
disassemble_info *info = (disassemble_info *) dis_info;
- info->fprintf_func (info->stream, "$%x", value);
+ info->fprintf_func (info->stream, "$%lx", value);
if (0)
print_normal (cd, dis_info, value, attrs, pc, length);
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]: Add format attributes and fix exposed bugs
2005-07-14 13:20 ` [PATCH]: Add format attributes and fix exposed bugs Alan Modra
@ 2005-07-15 0:58 ` Frank Ch. Eigler
0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2005-07-15 0:58 UTC (permalink / raw)
To: Alan Modra; +Cc: cgen, Kaveh R. Ghazi
Hi -
> A number of these are generated files. Obvious patch to fix the
> source follows. OK to apply? [...]
Sure, especially if you were able to test on both 64-bit and 32-bit hosts.
- FChE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-15 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200506161443.j5GEhAGa016852@caipclassic.rutgers.edu>
[not found] ` <m3fyvclhzz.fsf@gossamer.airs.com>
[not found] ` <200506210234.j5L2YqY2012723@caipclassic.rutgers.edu>
[not found] ` <1120698253.11505.128.camel@aretha.corp.specifix.com>
[not found] ` <200507071426.j67EQptX019240@caipclassic.rutgers.edu>
2005-07-14 13:20 ` [PATCH]: Add format attributes and fix exposed bugs Alan Modra
2005-07-15 0:58 ` Frank Ch. Eigler
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 read-only IMAP folder(s) and NNTP newsgroup(s).