summaryrefslogtreecommitdiff
path: root/gcc/config/avr/avr.h
diff options
context:
space:
mode:
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-21 09:00:26 +0000
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-21 09:00:26 +0000
commit644ac9c55e82057eba06c5afaa9a3c6a109796c2 (patch)
treed48ea8420f59893a11d672dfdf33aa1a4979598f /gcc/config/avr/avr.h
parentcde39152023f3a8485c36fff43b39ff17279b5da (diff)
downloadgcc-644ac9c55e82057eba06c5afaa9a3c6a109796c2.tar.gz
* config/avr/avr.h (struct base_arch_s): Add field sfr_offset.
* config/avr/avr-devices.c: Ditto. And initialize it. * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in define __AVR_SFR_OFFSET__. * config/avr/avr-protos.h (out_movqi_r_mr, out_movqi_mr_r): Remove. (out_movhi_r_mr, out_movhi_mr_r): Remove. (out_movsi_r_mr, out_movsi_mr_r): Remove. * config/avr/avr.md (*cbi, *sbi): Use %i instead of %m-0x20. (*insv.io, *insv.not.io): Ditto. * config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r): Make static. (print_operand): Implement "%i" to print address as I/O address. (output_movqi): Clean up call of out_movqi_mr_r. (output_movhi): Clean up call of out_movhi_mr_r. (avr_file_start): Use avr_current_arch->sfr_offset instead of magic -0x20. Use TMP_REGNO, ZERO_REGNO instead of 0, 1. (avr_out_sbxx_branch): Use %i instead of %m-0x20. (out_movqi_r_mr, out_movqi_mr_r): Ditto. And make static. (out_movhi_r_mr, out_movhi_mr_r): Ditto. And use avr_asm_len. (out_shift_with_cnt): Clean up code: Use avr_asm_len. (output_movsisf): Use output_reload_insisf for all CONSTANT_P sources. (avr_out_movpsi): USE avr_out_reload_inpsi for all CONSTANT_P sources. Clean up call of avr_out_store_psi. (output_reload_in_const): Don't cut symbols longer than 2 bytes. (output_reload_insisf): Filter CONST_INT_P or CONST_DOUBLE_P to try if setting pre-cleared register is advantageous. (avr_out_plus_1): Use gen_int_mode instead of GEN_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/avr/avr.h')
-rw-r--r--gcc/config/avr/avr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 30bca35349a..96133b8da28 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -23,7 +23,8 @@ along with GCC; see the file COPYING3. If not see
/* Names to predefine in the preprocessor for this target machine. */
-struct base_arch_s {
+struct base_arch_s
+{
/* Assembler only. */
int asm_only;
@@ -54,6 +55,10 @@ struct base_arch_s {
/* Default start of data section address for architecture. */
int default_data_section_start;
+ /* Offset between SFR address and RAM address:
+ SFR-address = RAM-address - sfr_offset */
+ int sfr_offset;
+
/* Number of 64k segments in the flash. */
int n_segments;