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: [patch] invalid error reports on v850-elf target/ppc-darwin host


Hello Nick,

I found that bug when I compiled gcc-3.4.6 (v850-elf target) with recent binutils. An error message is follows:
../../gcc/config/v850/lib1funcs.asm: Assembler messages:
../../gcc/config/v850/lib1funcs.asm:1613: Error: prepare {r20-r29},0: operand out of range (0 is not between 0 and -1)


I'm sorry I can't create a pinpoint test case as I'm not good at v850 assembler.

Regards,

On 2008/04/26, at 0:03, Nick Clifton wrote:

Hi Masaki,

As you know, it is undefined in case bit shift with negative value.
The result of (long)((1 << -1) - 1) is also undefined.

This patch is fix assemble error caused by the behavior above.

Thank you for submitting this patch.


It is a good patch, but it does not go far enough. Looking at the code there seems to be several other places where these shifts by negative values could occur, so we really should fix all of them. Plus it would be very helpful if you could include a testcase that triggers the problem, so that we can make sure that it does not reoccur in the future.

Cheers
 Nick




Masaki Muranaka Monami Software





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