public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49868] Implement named address space to place/access data in flash memory Date: Tue, 15 Nov 2011 09:36:00 -0000 [thread overview] Message-ID: <bug-49868-4-XzAqbM1T7V@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-49868-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49868 --- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-11-15 09:01:50 UTC --- Author: gjl Date: Tue Nov 15 09:01:46 2011 New Revision: 181378 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181378 Log: gcc/ PR target/49868 * config/avr/avr.h (ADDR_SPACE_PGM): New address spaces. (REGISTER_TARGET_PRAGMAS): New define. * config/avr/avr-protos.h (avr_mem_pgm_p): New. (avr_load_libgcc_p): New. (asm_output_external_libcall): Remove. (avr_register_target_pragmas): New. (avr_log_t): Add field "progmem". Order alphabetically. * config/avr/avr-log.c (avr_log_set_avr_log): Set avr_log.progmem. * config/avr/avr-c.c (langhooks.h): New include. (avr_register_target_pragmas): New function. Register address space __pgm. (avr_cpu_cpp_builtins): Add built-in define __PGM. * config/avr/avr.c: Include "c-family/c-common.h". (TARGET_LEGITIMATE_ADDRESS_P): Remove define. (TARGET_LEGITIMIZE_ADDRESS): Remove define. (TARGET_ADDR_SPACE_SUBSET_P): Define to... (avr_addr_space_subset_p): ...this new static function. (TARGET_ADDR_SPACE_CONVERT): Define to... (avr_addr_space_convert): ...this new static function. (TARGET_ADDR_SPACE_ADDRESS_MODE): Define to... (avr_addr_space_address_mode): ...this new static function. (TARGET_ADDR_SPACE_POINTER_MODE): Define to... (avr_addr_space_pointer_mode): ...this new static function. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define to... (avr_addr_space_legitimate_address_p): ...this new static function. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Define to... (avr_addr_space_legitimize_address): ...this new static function. (avr_mode_code_base_reg_class): Handle address spaces. (avr_regno_mode_code_ok_for_base_p): Ditto. (lpm_addr_reg_rtx, lpm_reg_rtx, all_regs_rtx): New static variables. (avr_option_override): Initialize them. (output_reload_in_const): Use all_regs_rtx. Fix signedness of loop variables. (avr_pgm_segment): New static function. (avr_decl_pgm_p, avr_mem_pgm_p): New static functions. (avr_out_lpm, avr_out_lpm_no_lpmx): New static functions. (output_movqi, output_movhi, output_movsisf, avr_out_movpsi): Call avr_out_lpm to handle loads from progmem. (avr_load_libgcc_p): New static function. (avr_progmem_p): Test if decl is in flash. (avr_pgm_pointer_const_p): New static function. (avr_nonconst_pointer_addrspace): New static function. (avr_pgm_check_var_decl): New static function. (avr_insert_attributes): Use it. Change error message to report cause (progmem or address space) when code wants to write to flash. (avr_section_type_flags): Unset section flag SECTION_BSS for data in progmem. * config/avr/predicates.md (nop_general_operand): New predicate. (nox_general_operand): New predicate. * config/avr/avr.md (LPM_REGNO): New define_constant. (load<mode>_libgcc): New expander. (*load.<mode>.libgcc): New insn. (mov<mode>): Handle loads from non-generic AS. (movmemhi): Ditto. Propagate address space information to newly created MEM. (movqi_insn, *movhi, *movpsi, *movsi, *movsf): Change predicate #1 to nox_general_operand. (ashrqi3, ashrhi3, ashrsi3): Change predicate #1 to nop_general_operand. (ashlqi3, *ashlqi3, ashlhi3, ashlsi3): Ditto. (lshrqi3, *lshrqi3, lshrhi3, lshrsi3): Ditto. (split-lpmx): New split. (*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const, *lshrhi3_const, *lshrsi3_const): Indent, unquote C. libgcc/ PR target/49868 * config/avr/t-avr (LIB1ASMFUNCS): Add _load_3, _load_4. * config/avr/lib1funcs.S (__load_3, __load_4, __xload_2): New functions. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr-log.c trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h trunk/gcc/config/avr/avr.md trunk/gcc/config/avr/predicates.md trunk/libgcc/ChangeLog trunk/libgcc/config/avr/lib1funcs.S trunk/libgcc/config/avr/t-avr
next prev parent reply other threads:[~2011-11-15 9:02 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-27 12:45 [Bug target/49868] New: " gjl at gcc dot gnu.org 2011-08-04 13:51 ` [Bug target/49868] " gjl at gcc dot gnu.org 2011-10-07 15:23 ` gjl at gcc dot gnu.org 2011-10-07 15:25 ` gjl at gcc dot gnu.org 2011-10-07 15:29 ` gjl at gcc dot gnu.org 2011-10-20 14:36 ` eric.weddington at atmel dot com 2011-10-20 15:19 ` gjl at gcc dot gnu.org 2011-11-15 9:36 ` gjl at gcc dot gnu.org [this message] 2011-11-18 17:00 ` gjl at gcc dot gnu.org 2011-11-18 23:08 ` gjl at gcc dot gnu.org 2011-12-06 14:41 ` gjl at gcc dot gnu.org 2011-12-15 16:38 ` gjl at gcc dot gnu.org 2011-12-15 19:09 ` gjl at gcc dot gnu.org 2012-01-10 9:43 ` gjl at gcc dot gnu.org 2012-01-20 12:39 ` gjl at gcc dot gnu.org 2012-01-20 13:01 ` gjl at gcc dot gnu.org 2012-01-24 13:18 ` gjl at gcc dot gnu.org 2012-01-25 19:09 ` gjl at gcc dot gnu.org 2012-02-28 8:45 ` gjl at gcc dot gnu.org 2012-03-12 17:56 ` gjl at gcc dot gnu.org 2012-03-20 11:49 ` gjl at gcc dot gnu.org 2012-03-22 15:04 ` gjl at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-49868-4-XzAqbM1T7V@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).