Summary: | Incomplete check in RTL for "pm()" annotation | ||
---|---|---|---|
Product: | gcc | Reporter: | Wouter van Gulik <wvangulik> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andrewhutchinson, eric.weddington, gcc-bugs |
Priority: | P3 | ||
Version: | 4.2.2 | ||
Target Milestone: | 4.5.0 | ||
Host: | Target: | avr-*-* | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-04-03 22:28:59 | |
Attachments: | Patch |
Description
Wouter van Gulik
2008-01-29 09:33:13 UTC
Created attachment 15169 [details] Patch The attached patch allows function address expressions of the form address+k to be correctly recognized as program memory addresses and thus force use of pm() assembler syntax. This has not been extensively tested but assembler appears to be correct for this bugs testcase and a similar issue found in: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27192 Note, odd addresses will be accepted by C and only cause linker warning. Subject: Bug 35013 Author: hutchinsonandy Date: Thu Dec 24 19:53:57 2009 New Revision: 155459 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155459 Log: 2009-12-24 Andy Hutchinson <hutchinsonandy@gcc.gnu.org> PR target/35013, 27192 * config/avr/avr.c (print_operand_address): Print correct program memory address. Add warning for large device offset addresses. (avr_assemble_integer): Ditto. (print_operand): Add warnings for incorrect addressing. (out_movqi_r_mr): Tag assembler with new address codes. (out_movhi_r_mr): Ditto. (out_movsi_r_mr): Ditto. (out_movqi_mr_r): Ditto. (out_movhi_mr_r): Ditto. (out_movsi_mr_r): Ditto. * config/avr/predicates.md (text_segment_operand): New predicate. * config/avr/avr.md (jump): Tag assembler with new address codes. (call_insn): Ditto. (call_value_insn): Ditto. (*tablejump_lib): Ditto. (*cbi): Ditto. (*sbi): Ditto. (indirect_jump): New define_expand. (jcindirect_jump): New pattern for constant expression jump. (njcindirect_jump): Renamed old indirect_jump. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/predicates.md Fixed 4.5 |