Binutils Port - Infineon xc16x family.
Nick Clifton
nickc@redhat.com
Fri Mar 3 14:26:00 GMT 2006
Hi Shrirang,
> Please find the patch with this mail for xc16x.opc file.
Sorry, I am confused. You are changing a function like this:
static const char *
parse_hash (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
const char **strp,
int opindex ATTRIBUTE_UNUSED,
long *valuep ATTRIBUTE_UNUSED)
{
if (**strp == '#')
++*strp;
return NULL;
}
To this:
static const char *
parse_hash (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
const char **strp,
int opindex ATTRIBUTE_UNUSED,
long *valuep ATTRIBUTE_UNUSED)
{
if (**strp == '#')
{
++*strp;
return NULL;
}
}
Correct ? And you say that this *fixes* a bug ? How is this possible ?
If the value pointed to by **strp is not a '#' character then what is
the function supposed to return ?
Surely you want the patch to produce a function something like this ?
static const char *
parse_hash (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
const char **strp,
int opindex ATTRIBUTE_UNUSED,
long *valuep ATTRIBUTE_UNUSED)
{
if (**strp == '#')
{
++*strp;
return NULL;
}
return _("Missing '#' prefix");
}
ie I think that your patch really ought to look like the attached file.
What do you think ?
cgen/ChangeLog
2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
* xc16x.opc (parse_hash): Return NULL if the input was parsed or
an error message otherwise.
(parse_dot, parse_pof, parse_pag, parse_sof, parse_seg):
Likewise.
Fix up comments to correctly describe the functions.
opcodes/ChangeLog
2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
* xc16x-asm.c: Regenerate.
* xc16x-dis.c: Regenerate.
* xc16x-ibld.c: Regenerate.
Cheers
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xc16c.opc.patch
Type: text/x-patch
Size: 6235 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060303/d95439df/attachment.bin>
More information about the Binutils
mailing list