This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Binutils Port - Infineon xc16x family.


Hi Nick 

  Thanks for the change suggested by you. 
  I checked the Patch you have send and , its working fine so you can
add it to the sources. 
One confusing thing is that it is not working if use "Return NULL" in
both the conditions.

Thanking you in advance
Regards
Shrirang Khisti

-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com] 
Sent: Friday, March 03, 2006 8:07 PM
To: Shrirang Khishti
Cc: binutils@sourceware.org; Shrinivas Atre; Anil Paranjape; Shilin
Shakti
Subject: Re: Binutils Port - Infineon xc16x family.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]