This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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 Fix PR35013, PR27192


Anatoly ,

This patch was posted to you for approval 2008-02-16

http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00644.html

Please can you comit this change.

best regards


Andrew Hutchinson wrote:
The attached patch fixes

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27192

Both of these problems occur because the avr backend fails to recognize function pointer expressions - such as foo + 2

As a result, these references are treated as byte addresses by assembler, rather word addresses using the pm() directive. The patch changes the operand check to one that finds the function reference buried in the expression. (This is similar to code used on the SPARC-gcc)

This patch has been tested using gcc version 4.3.0 20080121 (experimental) with HEAD versions of the AVR files. No regressions occurred running gcc.c-torture/execute testsuite with simulator and the PR test cases generate the correct code.

Please comit.

2008-02-16 Andy Hutchinson <hutchinsonandy@aim.com>

PR avr/35013 avr/27192

* avr.h (text_segment_operand): New function to check program memory address.

* avr.c (text_segment_operand): New function to check program memory address.
(print_operand_address, avr_assemble_integer): Add new check.








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