gcc/libgcc
Georg-Johann Lay 7c20948114 re PR target/49868 (Implement named address space to place/access data in flash memory)
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.

From-SVN: r181378
2011-11-15 09:01:46 +00:00
..
config re PR target/49868 (Implement named address space to place/access data in flash memory) 2011-11-15 09:01:46 +00:00
soft-fp soft-fp: Move to ../libgcc. 2011-08-05 15:13:48 +00:00
ChangeLog re PR target/49868 (Implement named address space to place/access data in flash memory) 2011-11-15 09:01:46 +00:00
Makefile.in re PR other/50991 (crtstuff.c:65:23: fatal error: libgcc_tm.h: No such file or directory) 2011-11-06 19:24:19 +00:00
config.host config.host (hppa*64*-*-hpux11*): Remove pa/t-stublib64 from tmake_file list. 2011-11-13 20:17:01 +00:00
configure Return gthr-posix.h to libgcc (PR bootstrap/50982) 2011-11-07 16:34:31 +00:00
configure.ac Return gthr-posix.h to libgcc (PR bootstrap/50982) 2011-11-07 16:34:31 +00:00
crtstuff.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
dfp-bit.c dfp-bit.c, dfp-bit.h: Move to ../libgcc. 2011-07-11 14:40:56 +00:00
dfp-bit.h Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
divmod.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
empty.mk
emutls.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
enable-execute-stack-empty.c enable-execute-stack-empty.c (__enable_execute_stack): Add prototype. 2011-06-22 13:20:07 +02:00
enable-execute-stack-mprotect.c netbsd.h (ENABLE_EXECUTE_STACK): Remove. 2011-06-09 12:30:46 +00:00
fixed-bit.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
fixed-bit.h Makefile.in (LIBGCC_VER_FIXEDPOINT_GNU_PREFIX): New. 2011-08-01 12:02:45 +00:00
fixed-obj.mk fixed-bit.c, [...]: Move to ../libgcc. 2011-07-08 11:18:38 +00:00
floatunsidf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsisf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsitf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsixf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
fp-bit.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
fp-bit.h Makefile.in (FPBIT_FUNCS, [...]): Remove. 2011-08-05 14:53:09 +00:00
gbl-ctors.h Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
gen-fixed.sh fixed-obj.mk: New file to support fine-grain fixed-point functions. 2007-09-17 22:18:13 +00:00
generic-morestack-thread.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
generic-morestack.c generic-morestack.c: Include <string.h>. 2011-11-09 20:06:31 +00:00
generic-morestack.h common.opt (fsplit-stack): New option. 2010-09-27 19:48:20 +00:00
gstdint.h dfp.c (WORDS_BIGENDIAN): Define to 0 if not defined. 2008-06-11 00:43:09 +01:00
gthr-posix.h Return gthr-posix.h to libgcc (PR bootstrap/50982) 2011-11-07 16:34:31 +00:00
gthr-single.h Move gthr to toplevel libgcc 2011-11-02 15:28:43 +00:00
gthr.h Move gthr to toplevel libgcc 2011-11-02 15:28:43 +00:00
libgcc-std.ver.in generic-morestack.c: Include <string.h>. 2011-11-09 20:06:31 +00:00
libgcc2.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
libgcc2.h Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
libgcov.c libgcov.c (struct gcov_fn_buffer): New struct. 2011-11-07 18:14:46 +00:00
longlong.h Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memcmp.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memcpy.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memmove.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memset.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
mkheader.sh Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
mkmap-flat.awk Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
mkmap-symver.awk Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
shared-object.mk shared-object.mk (c_flags-$o): Save c_flags. 2011-06-21 14:26:13 +00:00
siditi-object.mk Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
static-object.mk
sync.c sync.c: Move to ../libgcc. 2011-08-09 15:40:30 +00:00
udivmod.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
udivmodsi4.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
unwind-arm-common.inc * unwind-arm-common.inc: Handle ID3/4 unwinding data. 2011-10-21 21:00:11 +00:00
unwind-c.c arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. 2011-09-13 12:48:33 +00:00
unwind-compat.c Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-compat.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2-fde-compat.c Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2-fde-dip.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
unwind-dw2-fde.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
unwind-dw2-fde.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
unwind-dw2.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-generic.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-pe.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-sjlj.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
unwind.inc Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00