diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 5 | ||||
-rw-r--r-- | gcc/config/avr/avr.md | 19 | ||||
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/avr/lib1funcs.S | 1 |
5 files changed, 34 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ceccc4..baac09c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2012-03-07 Georg-Johann Lay <avr@gjlay.de> + PR target/52505 + * config/avr/avr.c (avr_out_xload): Don't read unintentionally + from RAM. + * config/avr/avr.md (xload_8): Adjust insn length. + +2012-03-07 Georg-Johann Lay <avr@gjlay.de> + PR target/52461 * gcc/config/avr/avr.c (avr_out_lpm): Clear RAMPZ after usage if RAMPZ affects reading from RAM. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index ef49c73..87b7e09 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -2789,8 +2789,9 @@ avr_out_xload (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen) if (plen) *plen = 0; - avr_asm_len ("ld %3,%a2" CR_TAB - "sbrs %1,7", xop, plen, 2); + avr_asm_len ("sbrc %1,7" CR_TAB + "ld %3,%a2" CR_TAB + "sbrs %1,7", xop, plen, 3); avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, 1); diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index bcf21af..9a208ee 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -363,6 +363,11 @@ ;;======================================================================== ;; Move stuff around +;; "loadqi_libgcc" +;; "loadhi_libgcc" +;; "loadpsi_libgcc" +;; "loadsi_libgcc" +;; "loadsf_libgcc" (define_expand "load<mode>_libgcc" [(set (match_dup 3) (match_dup 2)) @@ -377,7 +382,12 @@ operands[1] = replace_equiv_address (operands[1], operands[3]); set_mem_addr_space (operands[1], ADDR_SPACE_FLASH); }) - + +;; "load_qi_libgcc" +;; "load_hi_libgcc" +;; "load_psi_libgcc" +;; "load_si_libgcc" +;; "load_sf_libgcc" (define_insn "load_<mode>_libgcc" [(set (reg:MOVMODE 22) (match_operand:MOVMODE 0 "memory_operand" "m,m"))] @@ -418,6 +428,11 @@ DONE; }) +;; "xloadqi_A" +;; "xloadhi_A" +;; "xloadpsi_A" +;; "xloadsi_A" +;; "xloadsf_A" (define_insn_and_split "xload<mode>_A" [(set (match_operand:MOVMODE 0 "register_operand" "=r") (match_operand:MOVMODE 1 "memory_operand" "m")) @@ -461,7 +476,7 @@ { return avr_out_xload (insn, operands, NULL); } - [(set_attr "length" "3,4") + [(set_attr "length" "4,4") (set_attr "adjust_len" "*,xload") (set_attr "isa" "lpmx,lpm") (set_attr "cc" "none")]) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index a85c694..9502424 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,11 @@ 2012-03-07 Georg-Johann Lay <avr@gjlay.de> + PR target/52505 + * config/avr/lib1funcs.S (__xload_1): Don't read unintentionally + from RAM. + +2012-03-07 Georg-Johann Lay <avr@gjlay.de> + PR target/52461 PR target/52508 * config/avr/lib1funcs.S (__do_copy_data): Clear RAMPZ after usage diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S index 1a8c7a1..6e6c390 100644 --- a/libgcc/config/avr/lib1funcs.S +++ b/libgcc/config/avr/lib1funcs.S @@ -2131,6 +2131,7 @@ ENDF __load_4 #if defined (L_xload_1) DEFUN __xload_1 #if defined (__AVR_HAVE_LPMX__) && !defined (__AVR_HAVE_ELPM__) + sbrc HHI8, 7 ld D0, Z sbrs HHI8, 7 lpm D0, Z |