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: [ARM] signed zero


Hi Nathan,

This patch fixes up things so that, for instance
ldr r0,[r1,#-0]
is encoded correctly.

tested on arm-eabi, ok?

Approved - please apply - except...


There are two places where you have code like this:

     {
 	skip_whitespace (q);
 	if (*q == '#') q++;
 	skip_whitespace (q);
 	if (*q == '-')
 	  inst.operands[i].negative = 1;
     }

The first if-statement should have its body indented on a new line:

    {
 	skip_whitespace (q);
 	if (*q == '#')
          q++;
 	skip_whitespace (q);
 	if (*q == '-')
 	  inst.operands[i].negative = 1;
     }

Plus if we are being really picky, the second skip only needs to be inside the body of the first if-statement:

    {
 	skip_whitespace (q);
 	if (*q == '#')
          {
            q++;
 	    skip_whitespace (q);
          }
 	if (*q == '-')
 	  inst.operands[i].negative = 1;
     }

Cheers
  Nick


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