[Bug target/29141] static constructors beyond 64k fail

2009-01-12 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2009-01-12 20:42 ---
Subject: Bug 29141

Author: aesok
Date: Mon Jan 12 20:41:57 2009
New Revision: 143306

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143306
Log:
PR target/29141
* config/avr/t-avr (LIB1ASMFUNCS): Add _tablejump_elpm.
* config/avr/libgcc.S (__do_global_ctors, __do_global_dtors): Add
variant for devices with 3-byte PC.
(__tablejump_elpm__) : New.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/libgcc.S
trunk/gcc/config/avr/t-avr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29141



[Bug target/29141] static constructors beyond 64k fail

2009-01-28 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2009-01-28 17:53 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29141



[Bug target/26504] [4.1/4.2 Regression] compute_frame_pointer_to_cfa_displacement error for avr target with --with-dwarf2

2006-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #14 from aesok at gcc dot gnu dot org  2006-09-14 21:11 ---
Subject: Bug 26504

Author: aesok
Date: Thu Sep 14 21:11:33 2006
New Revision: 116950

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116950
Log:
PR target/26504
* config/avr/avr.h (FRAME_POINTER_CFA_OFFSET): Define.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504



[Bug target/26504] [4.1/4.2 Regression] compute_frame_pointer_to_cfa_displacement error for avr target with --with-dwarf2

2006-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #15 from aesok at gcc dot gnu dot org  2006-09-14 21:19 ---
Subject: Bug 26504

Author: aesok
Date: Thu Sep 14 21:19:10 2006
New Revision: 116952

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116952
Log:
PR target/26504
* config/avr/avr.h (FRAME_POINTER_CFA_OFFSET): Define.

Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504



[Bug target/26504] [4.1/4.2 Regression] compute_frame_pointer_to_cfa_displacement error for avr target with --with-dwarf2

2006-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #16 from aesok at gcc dot gnu dot org  2006-09-14 21:39 ---
Change Status to FIXED.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504



[Bug target/26504] [4.1/4.2 Regression] compute_frame_pointer_to_cfa_displacement error for avr target with --with-dwarf2

2006-10-10 Thread aesok at gcc dot gnu dot org


--- Comment #18 from aesok at gcc dot gnu dot org  2006-10-10 22:18 ---
Subject: Bug 26504

Author: aesok
Date: Tue Oct 10 22:18:06 2006
New Revision: 117616

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117616
Log:
* config/avr/predicates.md: New file.
* config/avr/avr.md: Include it.
(REG_SP): New constant.
(peepholes): Use predicates.
(sbrx_branch, sbrx_and_branchhi, sbrx_and_branchsi, branch, rvbranch,
difficult_branch,  difficult_rvbranch, cbi, sbi, sbix_branch,
sbix_branch_bit7, sbix_branch_tmp, sbix_branch_tmp_bit7): Ditto.
PR target/26504
* config/avr/avr.h (FRAME_POINTER_CFA_OFFSET): Define.

Added:
trunk/gcc/config/avr/predicates.md   (with props)
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.md

Propchange: trunk/gcc/config/avr/predicates.md
('svn:executable' added)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504



[Bug target/19087] Overflowed address in dwarf debug line information

2007-01-31 Thread aesok at gcc dot gnu dot org


--- Comment #27 from aesok at gcc dot gnu dot org  2007-01-31 17:24 ---
Subject: Bug 19087

Author: aesok
Date: Wed Jan 31 17:23:49 2007
New Revision: 121426

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121426
Log:
PR target/19087
* config/avr/avr.c (DWARF2_ADDR_SIZE): Define.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19087



[Bug target/19087] Overflowed address in dwarf debug line information

2007-01-31 Thread aesok at gcc dot gnu dot org


--- Comment #28 from aesok at gcc dot gnu dot org  2007-01-31 17:35 ---
Subject: Bug 19087

Author: aesok
Date: Wed Jan 31 17:35:01 2007
New Revision: 121428

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121428
Log:
PR target/19087
* config/avr/avr.c (DWARF2_ADDR_SIZE): Define.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19087



[Bug target/19087] Overflowed address in dwarf debug line information

2007-02-15 Thread aesok at gcc dot gnu dot org


--- Comment #30 from aesok at gcc dot gnu dot org  2007-02-15 20:02 ---
Subject: Bug 19087

Author: aesok
Date: Thu Feb 15 20:01:59 2007
New Revision: 122013

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122013
Log:
PR target/19087
* config/avr/avr.c (DWARF2_ADDR_SIZE): Define.



Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19087



[Bug target/19087] Overflowed address in dwarf debug line information

2007-02-15 Thread aesok at gcc dot gnu dot org


--- Comment #31 from aesok at gcc dot gnu dot org  2007-02-15 20:13 ---
Fixed in 4.1.3, 4.2.0 and 4.3.0.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19087



[Bug rtl-optimization/30841] New: Missed optimizations for sbi/cbi instructions

2007-02-18 Thread aesok at gcc dot gnu dot org
demo.c:
#define PORTD (*(volatile unsigned char *)(50))

int
main (void)
{
  PORTD |= 1;

  return 0;
}

Revision r118474:
.LM2:
 ; (insn 14 12 18 main.c:6 (set (mem/v:QI (const_int 50 [0x32]) [0 S1 A8])
 ; (ior:QI (mem/v:QI (const_int 50 [0x32]) [0 S1 A8])
 ; (const_int 1 [0x1]))) 114 {*sbi} (nil)
 ; (nil))
sbi 50-0x20,0;  14  *sbi[length = 1]


Revision r118475:
.LM2:
 ; (insn 10 9 11 main.c:6 (set (reg/f:HI 30 r30 [44])
 ; (const_int 50 [0x32])) 12 {*movhi} (nil)
 ; (expr_list:REG_EQUIV (const_int 50 [0x32])
 ; (nil)))
ldi r30,lo8(50)  ;  10  *movhi/4[length = 2]
ldi r31,hi8(50)
 ; (insn 11 10 12 main.c:6 (set (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ; (mem/v:QI (reg/f:HI 30 r30 [44]) [0 S1 A8])) 9 {*movqi}
(insn_list:REG_DEP_TRUE 10 (nil))
 ; (nil))
ld r24,Z ;  11  *movqi/4[length = 1]
 ; (insn 12 11 14 main.c:6 (set (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ; (ior:QI (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ; (const_int 1 [0x1]))) 47 {iorqi3} (insn_list:REG_DEP_TRUE 11
(nil))
 ; (nil))
ori r24,lo8(1)   ;  12  iorqi3/2[length = 1]
 ; (insn 14 12 18 main.c:6 (set (mem/v:QI (reg/f:HI 30 r30 [44]) [0 S1 A8])
 ; (reg:QI 24 r24 [orig:42 D.1514 ] [42])) 9 {*movqi}
(insn_list:REG_DEP_TRUE 12 (nil))
 ; (expr_list:REG_DEAD (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ; (expr_list:REG_DEAD (reg/f:HI 30 r30 [44])
 ; (nil
st Z,r24 ;  14  *movqi/3[length = 1]

Revision 118475  
2006-11-03  Paolo Bonzini  <[EMAIL PROTECTED]>
Steven Bosscher  <[EMAIL PROTECTED]>

* fwprop.c: New file.
* Makefile.in: Add fwprop.o.
* tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
* passes.c (init_optimization_passes): Schedule forward propagation.
* rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
parameter.
* timevar.def (TV_FWPROP): New.
* common.opt (-fforward-propagate): New.
* opts.c (decode_options): Enable forward propagation at -O2.
* gcse.c (one_cprop_pass): Do not run local cprop unless touching
jumps.
* cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr,
canon_for_address, table_size): Remove.
(new_basic_block, insert, remove_from_table): Remove references to
table_size.
(fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
simplification loop more straightforward by not calling fold_rtx
recursively.
(equiv_constant): Move here a small part of fold_rtx_subreg,
do not call fold_rtx.  Call avoid_constant_pool_reference
to process MEMs.
* recog.c (canonicalize_change_group): New.
* recog.h (canonicalize_change_group): New.

* doc/invoke.texi (Optimization Options): Document fwprop.
* doc/passes.texi (RTL passes): Document fwprop.

Anatoly.


-- 
   Summary: Missed optimizations for sbi/cbi instructions
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aesok at gcc dot gnu dot org
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30841



[Bug target/31137] missing "break" in switch for MULT in avr_rtx_costs

2007-04-02 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2007-04-02 22:44 ---
Subject: Bug 31137

Author: aesok
Date: Mon Apr  2 22:43:53 2007
New Revision: 123437

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123437
Log:
PR target/31137
* config/avr/avr.c (avr_rtx_costs): Add missing 'break' statements.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31137



[Bug target/31137] missing "break" in switch for MULT in avr_rtx_costs

2007-04-02 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2007-04-02 22:53 ---
Subject: Bug 31137

Author: aesok
Date: Mon Apr  2 22:53:14 2007
New Revision: 123438

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123438
Log:
PR target/31137
* config/avr/avr.c (avr_rtx_costs): Add missing 'break' statements.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31137



[Bug target/31137] missing "break" in switch for MULT in avr_rtx_costs

2007-04-02 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-02 23:00 ---
Subject: Bug 31137

Author: aesok
Date: Mon Apr  2 23:00:28 2007
New Revision: 123439

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123439
Log:
PR target/31137
* config/avr/avr.c (avr_rtx_costs): Add missing 'break' statements.



Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31137



[Bug target/31137] missing "break" in switch for MULT in avr_rtx_costs

2007-04-02 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-04-02 23:03 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31137



[Bug target/25448] [4.0/4.1/4.2/4.3 Regression] Unfounded warnings from the AVR backend

2007-04-05 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-05 16:43 ---
Subject: Bug 25448

Author: aesok
Date: Thu Apr  5 16:43:35 2007
New Revision: 123519

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123519
Log:
PR target/25448
* config/avr/avr.c (avr_handle_fndecl_attribute): Use the 
DECL_ASSEMBLER_NAME, not the DECL_NAME.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25448



[Bug target/25448] [4.0/4.1/4.2/4.3 Regression] Unfounded warnings from the AVR backend

2007-04-05 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2007-04-05 16:56 ---
Subject: Bug 25448

Author: aesok
Date: Thu Apr  5 16:56:43 2007
New Revision: 123521

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123521
Log:
PR target/25448
* config/avr/avr.c (avr_handle_fndecl_attribute): Use the 
DECL_ASSEMBLER_NAME, not the DECL_NAME.


Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25448



[Bug target/25448] [4.0/4.1/4.2/4.3 Regression] Unfounded warnings from the AVR backend

2007-04-05 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-04-05 16:50 ---
Subject: Bug 25448

Author: aesok
Date: Thu Apr  5 16:50:27 2007
New Revision: 123520

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123520
Log:
PR target/25448
* config/avr/avr.c (avr_handle_fndecl_attribute): Use the 
DECL_ASSEMBLER_NAME, not the DECL_NAME.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25448



[Bug target/25448] [4.0/4.1/4.2/4.3 Regression] Unfounded warnings from the AVR backend

2007-04-05 Thread aesok at gcc dot gnu dot org


--- Comment #7 from aesok at gcc dot gnu dot org  2007-04-05 16:59 ---
Fixsed in 4.1.3, 4.2 and 4.3.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25448



[Bug target/30483] Internal compiler error with inline volatile assembly on AVR

2007-04-06 Thread aesok at gcc dot gnu dot org


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-04-06 19:15:59
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483



[Bug target/30289] avr-gcc: builtin memset(): wrong code

2007-04-07 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2007-04-07 23:00 ---
Subject: Bug 30289

Author: aesok
Date: Sat Apr  7 23:00:33 2007
New Revision: 123647

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123647
Log:
PR target/30289
* config/avr/avr.md (*clrmemqi, *clrmemhi): Mark operand 4 as 
earlyclobber.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30289



[Bug target/30289] avr-gcc: builtin memset(): wrong code

2007-04-07 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2007-04-07 23:15 ---
Subject: Bug 30289

Author: aesok
Date: Sat Apr  7 23:14:51 2007
New Revision: 123648

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123648
Log:
PR target/30289
* config/avr/avr.md (*clrmemqi, *clrmemhi): Mark operand 4 as 
earlyclobber.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30289



[Bug target/30289] avr-gcc: builtin memset(): wrong code

2007-04-07 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-07 23:21 ---
Subject: Bug 30289

Author: aesok
Date: Sat Apr  7 23:21:01 2007
New Revision: 123649

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123649
Log:
PR target/30289
* config/avr/avr.md (*clrmemqi, *clrmemhi): Mark operand 4 as 
earlyclobber.


Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30289



[Bug target/30289] avr-gcc: builtin memset(): wrong code

2007-04-07 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-04-07 23:23 ---
Fixed in 4.1, 4.2 branch, and HEAD. 


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30289



[Bug target/29932] avr-gcc wrongly optimizes bit sets/resets for IO register 0x20

2007-04-08 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-08 11:38 ---
Subject: Bug 29932

Author: aesok
Date: Sun Apr  8 11:38:38 2007
New Revision: 123657

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123657
Log:
PR target/29932
* config/avr/predicates.md (io_address_operand): Delete predicate.
(low_io_address_operand): Don't use 'mode' argument.
(higth_io_address_operand): Rename ...
(high_io_address_operand): ... to this. Don't use 'mode' argument.
* config/avr/avr.md (*sbix_branch_tmp, *sbix_branch_tmp_bit7): Adjust
for above change.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.md
trunk/gcc/config/avr/predicates.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29932



[Bug target/29932] avr-gcc wrongly optimizes bit sets/resets for IO register 0x20

2007-04-08 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-04-08 15:40 ---
Subject: Bug 29932

Author: aesok
Date: Sun Apr  8 15:39:59 2007
New Revision: 123659

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123659
Log:
PR target/29932
* config/avr/predicates.md (io_address_operand): Delete predicate.
(low_io_address_operand): Don't use 'mode' argument.
(higth_io_address_operand): Rename ...
(high_io_address_operand): ... to this. Don't use 'mode' argument.
* config/avr/avr.md (*sbix_branch_tmp, *sbix_branch_tmp_bit7): Adjust
for above change.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.md
branches/gcc-4_2-branch/gcc/config/avr/predicates.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29932



[Bug target/29932] avr-gcc wrongly optimizes bit sets/resets for IO register 0x20

2007-04-08 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2007-04-08 15:42 ---
Fixed in 4.2 branch and HEAD. 


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29932




[Bug target/30483] Internal compiler error with inline volatile assembly on AVR

2007-04-17 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2007-04-17 21:09 ---
Subject: Bug 30483

Author: aesok
Date: Tue Apr 17 21:08:46 2007
New Revision: 123926

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123926
Log:
PR target/30483
* config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
error().

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483



[Bug target/30483] Internal compiler error with inline volatile assembly on AVR

2007-04-17 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2007-04-17 21:13 ---
Subject: Bug 30483

Author: aesok
Date: Tue Apr 17 21:13:29 2007
New Revision: 123927

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123927
Log:
PR target/30483
* config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
error().

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483



[Bug target/30483] Internal compiler error with inline volatile assembly on AVR

2007-04-17 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-17 21:19 ---
Subject: Bug 30483

Author: aesok
Date: Tue Apr 17 21:19:06 2007
New Revision: 123929

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123929
Log:
PR target/30483
* config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
error().

Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483



[Bug target/30483] Internal compiler error with inline volatile assembly on AVR

2007-04-17 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-04-17 21:23 ---
Fixed in 4.1, 4.2 branch, and HEAD. 


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.1.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30483



[Bug target/18989] A few potentially ominous, and several likely harmless warnings during 4.0 build

2007-04-24 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2007-04-25 07:18 ---
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 07:18:33 2007
New Revision: 124141

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124141
Log:
PR target/18989
* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18989



[Bug target/18989] A few potentially ominous, and several likely harmless warnings during 4.0 build

2007-04-25 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2007-04-25 19:38 ---
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 19:38:32 2007
New Revision: 124159

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124159
Log:
PR target/18989
* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18989



[Bug target/18989] A few potentially ominous, and several likely harmless warnings during 4.0 build

2007-04-25 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-04-25 19:52 ---
Subject: Bug 18989

Author: aesok
Date: Wed Apr 25 19:52:21 2007
New Revision: 124162

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124162
Log:
PR target/18989
* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18989



[Bug rtl-optimization/33028] New: Missed optimizations in peephole2 pass

2007-08-08 Thread aesok at gcc dot gnu dot org
Hi,

AVR backend have peephole2 for optimizing two register move instructions (mov)
in one register pair move instruction (movw):

(define_peephole2 ; movw
  [(set (match_operand:QI 0 "even_register_operand" "")
(match_operand:QI 1 "even_register_operand" ""))
   (set (match_operand:QI 2 "odd_register_operand" "")
(match_operand:QI 3 "odd_register_operand" ""))]
  "(AVR_HAVE_MOVW
&& REGNO (operands[0]) == REGNO (operands[2]) - 1
&& REGNO (operands[1]) == REGNO (operands[3]) - 1)"
  [(set (match_dup 4) (match_dup 5))]
  {
operands[4] = gen_rtx_REG (HImode, REGNO (operands[0]));
operands[5] = gen_rtx_REG (HImode, REGNO (operands[1]));
  })

Testcase:

unsigned char ADCH;
unsigned char ADCL;

unsigned int foo(void) {

  unsigned int temp = 0;  

  temp = ((ADCH<<8)|ADCL); 

  return temp;
}

# avr-gcc -Os  -mmcu=atmega16  -save-temps  -dP  -c -o demo.o demo.c

Compiled in:

.LM3:
 ; (insn 32 10 33 demo.c:34 (set (reg:QI 24 r24 [  ])
 ; (reg:QI 18 r18 [42])) 4 {*movqi} (expr_list:REG_DEAD (reg:QI 18 r18
[42])
 ; (nil)))
mov r24,r18  ;  32  *movqi/1[length = 1]
 ; (insn 33 32 21 demo.c:34 (set (reg:QI 25 r25 [+1 ])
 ; (reg:QI 19 r19 [+1 ])) 4 {*movqi} (expr_list:REG_DEAD (reg:QI 19 r19
[+1 ])
 ; (nil)))
mov r25,r19  ;  33  *movqi/1[length = 1]
/* epilogue start */
 ; (jump_insn/f 40 39 41 demo.c:34 (return) 128 {return} (nil))
ret  ;  40  return  [length = 1]

insns 32 ana 33 full match peephole, but do not optimize. If in avr.md file add
new peephole2 with three insn patterns (now avr backend use peephole2 with max
two insn patterns):


(define_peephole2 
  [(set (match_operand:QI 0 "register_operand" "")
(match_dup 0))
   (set (match_dup 0)
(match_dup 0))
   (set (match_dup 0)
(match_dup 0))]
  ""
  [(set (match_dup 0) (match_dup 0))]
  {})

then two 'mov' instruction is optimized in 'movw':

.LM3:
 ; (insn 42 10 21 demo.c:34 (set (reg:HI 24 r24)
 ; (reg:HI 18 r18)) 8 {*movhi} (nil))
movw r24,r18 ;  42  *movhi/1[length = 1]
/* epilogue start */
 ; (jump_insn/f 40 39 41 demo.c:34 (return) 128 {return} (nil))
ret  ;  40  return  [length = 1]
.LFE2:


This behaviour is caused by the patch:
[patch RFA] Keep the correct peep2_current_count:
http://gcc.gnu.org/ml/gcc-patches/2005-10/msg01368.html


Anatoly.


-- 
   Summary: Missed optimizations in peephole2 pass
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
          Severity: major
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aesok at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33028



[Bug rtl-optimization/33028] Missed optimizations in peephole2 pass

2007-08-25 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2007-08-25 10:02 ---
Created an attachment (id=14112)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14112&action=view)
Patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33028



[Bug target/28902] Fix for "alingment of XXX is greater than maximum object alignment" on AVR

2007-09-03 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2007-09-03 20:35 ---
Subject: Bug 28902

Author: aesok
Date: Mon Sep  3 20:35:10 2007
New Revision: 128059

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128059
Log:
PR target/28902
* config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28902



[Bug target/28902] Fix for "alingment of XXX is greater than maximum object alignment" on AVR

2007-09-03 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2007-09-03 21:04 ---
Subject: Bug 28902

Author: aesok
Date: Mon Sep  3 21:03:50 2007
New Revision: 128060

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128060
Log:
PR target/28902
* config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.


Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28902



[Bug target/28902] Fix for "alingment of XXX is greater than maximum object alignment" on AVR

2007-09-06 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-09-06 21:17 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.2.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28902



[Bug target/19684] avr wrong size in asm comment (peephole)

2007-10-04 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-10-04 07:06 ---
  The code that which print size of prologue and epilogue was removed when avr
port was switched from asm-prologue/epilogue to RTL-prologue/epilogue. 

Anatoly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19684



[Bug target/19684] avr wrong size in asm comment (peephole)

2007-10-04 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-10-04 07:09 ---
Fixed in trunk.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19684



[Bug rtl-optimization/33028] Missed optimizations in peephole2 pass

2007-10-04 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-10-04 21:22 ---
Fixed in trunk.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 GCC target triplet||avr
 Resolution||FIXED
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33028



[Bug rtl-optimization/33028] Missed optimizations in peephole2 pass

2007-10-04 Thread aesok at gcc dot gnu dot org


--- Comment #4 from aesok at gcc dot gnu dot org  2007-10-04 21:21 ---
Patch <http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00270.html> fix this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33028



[Bug debug/37020] [4.4 Regression] FAIL: gcc.dg/debug/dwarf2/dwarf-die3.c scan-assembler-not DW_AT_inline

2008-08-07 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2008-08-07 16:53 ---
The gcc.dg/debug/dwarf2/dwarf-die3.c testcase FALL on x86_64-unknown-linux-gnu
also.

Anatoliy


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 GCC target triplet|avr-*-* |x86_64-unknown-linux-gnu
   ||avr-*-*
Summary|[4.4 Regression] [AVR] FAIL:|[4.4 Regression] FAIL:
   |gcc.dg/debug/dwarf2/dwarf-  |gcc.dg/debug/dwarf2/dwarf-
   |die3.c scan-assembler-not   |die3.c scan-assembler-not
   |DW_AT_inline|DW_AT_inline


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37020



[Bug target/11259] [avr] gcc Double 'andi' missed optimization

2008-08-22 Thread aesok at gcc dot gnu dot org


--- Comment #9 from aesok at gcc dot gnu dot org  2008-08-22 21:26 ---
Subject: Bug 11259

Author: aesok
Date: Fri Aug 22 21:24:56 2008
New Revision: 139502

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139502
Log:
PR target/11259
* config/avr/avr.md (UNSPEC_SWAP): New constants.
(*swap): New insn pattern.
(*ashlqi3): Rename from ashlqi3 insn pattern.
(ashlqi3): New expanders.
(*lshrqi3): Rename from lshrqi3 insn pattern.
(lshrqi3): New expanders.   
(ashlqi3_const4, ashlqi3_const5, ashlqi3_const6, lshrqi3_const4,
lshrqi3_const5, lshrqi3_const6): New splitters.
(andi, ashlqi3_l_const4, ashlqi3_l_const5, ashlqi3_l_const6,
lshrqi3_l_const4, lshrqi3_l_const5, lshrqi3_l_const6): Define
peephole2 patterns.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11259



[Bug target/37466] New: [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands

2008-09-10 Thread aesok at gcc dot gnu dot org
Reported by geckosenator on avrfreaks.net


Code:

int sat; 

static volatile long data[3]; 
static volatile int datacount[3]; 

static volatile int chan; 
static volatile long val; 

int __attribute__((always_inline)) transfer(int data) 
{ 
   return (*(int *)((0x00))); 
} 

int init_status; 

long read_scale(void) 
{ 
   long val; 
   if(init_status) 
  val |= (long)transfer(0) << 16; 
   val |= (long)transfer(0) << 8; 
   return val; 
} 

void get_mode(int *mode, int *psw) 
{ 
int val = transfer(0); 
*psw = val & 0x10 ? 1 : 0; 
} 

long __attribute__((always_inline)) read_data(void) 
{ 
   long val; 

   val <<= 8; 
   if(init_status) 
  val |= transfer(0); 

   return val - 0x80; 
} 

void function1() 
{ 
long data2 = read_data(); 
sat = (data2 > 1) || (data2 < -100); 
val += data2; 
data[chan] += val; 
datacount[chan] ++; 
} 

void function2(long *data) 
{ 
int i, j; 
data[i] += i + j; 
} 




Compile with: 

Code:

avr-gcc -std=gnu99 -fgnu89-inline -Os -mmcu=at90usb1287 -c testcase.c -o
testcase.S -S 



Then look in testcase.S for: 

Code:

.L16: 
   ldi r16,lo8(-128) 
   mov r14,r16 
   ldi r16,hi8(-128) 
   mov r15,r16 
   ldi r16,hlo8(-128) 
   mov r16,r16<-  bad, this does nothing! 
   ldi r16,hhi8(-128) <-- nice, we just clobbered r16 
   mov r17,r16 
   add r14,r18 
   adc r15,r19 
   adc r16,r20 
   adc r17,r21 
   sts (sat)+1,__zero_reg__ 



It looks like the compiler got confused and tried to use r16 in two different
ways at the same time. 


The bug occurs in peephole optmisation. Here avr-gcc looks for a spare register
R16-R31 that it can use to load a constant value into operands which are
located in lower register (R2-R15). 

The test for "spare" occurred before instruction. So if the instruction
happened to use that register (because it was spare), bad things
happen.Typically this will happen with long - or long long registers.


-- 
   Summary: [AVR] avr-gcc generating incorrect assembly for
expression with the long constant operands
   Product: gcc
   Version: 4.2.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: aesok at gcc dot gnu dot org
GCC target triplet: avr-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37466



[Bug target/37466] [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands

2008-09-10 Thread aesok at gcc dot gnu dot org


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |aesok at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-09-10 19:33:50
   date||
Summary|[AVR] avr-gcc generating|[AVR] avr-gcc generating
   |incorrect assembly for  |incorrect assembly for
   |expression with the long|expression with the long
   |constant operands   |constant operands


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37466



[Bug target/37466] [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands

2008-09-12 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2008-09-12 16:46 ---
Subject: Bug 37466

Author: aesok
Date: Fri Sep 12 16:45:34 2008
New Revision: 140321

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140321
Log:
PR target/37466
* config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for
scratch register after 'set' pattern.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37466



[Bug target/37466] [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands

2008-09-12 Thread aesok at gcc dot gnu dot org


--- Comment #2 from aesok at gcc dot gnu dot org  2008-09-12 17:30 ---
Subject: Bug 37466

Author: aesok
Date: Fri Sep 12 17:29:38 2008
New Revision: 140323

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140323
Log:
PR target/37466
* config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for
scratch register after 'set' pattern.

Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37466



[Bug target/37466] [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands

2008-09-12 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2008-09-12 17:36 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37466



[Bug target/24894] ICE building newlib/libc/misc/init.c

2008-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2008-09-14 12:51 ---
Subject: Bug 24894

Author: aesok
Date: Sun Sep 14 12:50:10 2008
New Revision: 140360

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140360
Log:
PR target/19636
PR target/24894
PR target/31644
PR target/31786
* config/avr/avr.c (legitimate_address_p): Fix problem where subreg
is not recognized as a valid register usage. Allow REG_X to be used
as a base pointer.
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
forces a reload when using a base register.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24894



[Bug target/31644] [avr] can't find a register in class 'BASE_POINTER_REGS' while reloading 'asm'

2008-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #9 from aesok at gcc dot gnu dot org  2008-09-14 12:51 ---
Subject: Bug 31644

Author: aesok
Date: Sun Sep 14 12:50:10 2008
New Revision: 140360

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140360
Log:
PR target/19636
PR target/24894
PR target/31644
PR target/31786
* config/avr/avr.c (legitimate_address_p): Fix problem where subreg
is not recognized as a valid register usage. Allow REG_X to be used
as a base pointer.
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
forces a reload when using a base register.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31644



[Bug target/31786] [4.2/4.3/4.4 Regression][avr] error: unable to find a register to spill in class 'BASE_POINTER_REGS'

2008-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #17 from aesok at gcc dot gnu dot org  2008-09-14 12:51 ---
Subject: Bug 31786

Author: aesok
Date: Sun Sep 14 12:50:10 2008
New Revision: 140360

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140360
Log:
PR target/19636
PR target/24894
PR target/31644
PR target/31786
* config/avr/avr.c (legitimate_address_p): Fix problem where subreg
is not recognized as a valid register usage. Allow REG_X to be used
as a base pointer.
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
forces a reload when using a base register.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31786



[Bug target/19636] [4.2 regression] Can't compile large switch statement

2008-09-14 Thread aesok at gcc dot gnu dot org


--- Comment #23 from aesok at gcc dot gnu dot org  2008-09-14 12:51 ---
Subject: Bug 19636

Author: aesok
Date: Sun Sep 14 12:50:10 2008
New Revision: 140360

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140360
Log:
PR target/19636
PR target/24894
PR target/31644
PR target/31786
* config/avr/avr.c (legitimate_address_p): Fix problem where subreg
is not recognized as a valid register usage. Allow REG_X to be used
as a base pointer.
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
forces a reload when using a base register.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19636



[Bug target/34412] ICE in extract_insn, at recog.c:1990

2008-01-28 Thread aesok at gcc dot gnu dot org


--- Comment #7 from aesok at gcc dot gnu dot org  2008-01-28 22:49 ---
Fixed in HEAD (4.3)


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34412



[Bug target/34412] ICE in extract_insn, at recog.c:1990

2008-01-28 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2008-01-28 22:40 ---
Subject: Bug 34412

Author: aesok
Date: Mon Jan 28 22:39:11 2008
New Revision: 131923

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131923
Log:
PR target/34412
* config/avr/avr.c (expand_prologue): Use correct QI mode frame 
pointer for tiny stack.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34412



[Bug target/39250] unsigned char times 64U produces long slow loop

2009-02-19 Thread aesok at gcc dot gnu dot org


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-02-19 18:37:06
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39250



[Bug target/39250] unsigned char times 64U produces long slow loop

2009-02-21 Thread aesok at gcc dot gnu dot org


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||36467
 AssignedTo|unassigned at gcc dot gnu   |aesok at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39250



[Bug target/39250] unsigned char times 64U produces long slow loop

2009-02-23 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2009-02-23 19:10 ---
Hi.

The GCC always use a shift for optimizing multiply by power of 2 constant.

expr.c:expand_expr_real_1:8680

  /* Check for a multiplication with matching signedness.  */
  else if (TREE_CODE (TREE_OPERAND (exp, 0)) == NOP_EXPR
  && TREE_CODE (type) == INTEGER_TYPE
  && (TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (exp, 0),
0)))
  < TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp, 0
  && ((TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST
   && int_fits_type_p (TREE_OPERAND (exp, 1),
   TREE_TYPE (TREE_OPERAND (TREE_OPERAND (exp,
0), 0)))
   /* Don't use a widening multiply if a shift will do.  */
   && ((GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp,
1
> HOST_BITS_PER_WIDE_INT)
   || exact_log2 (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))) <
0))

expmed.c:expand_mult
...
  if (coeff != 0)
{
  /* Special case powers of two.  */
  if (EXACT_POWER_OF_2_OR_ZERO_P (coeff))
return expand_shift (LSHIFT_EXPR, mode, op0,
 build_int_cst (NULL_TREE, floor_log2 (coeff)),
 target, unsignedp);


For the AVR target for multiply by 2 with using  a shift give better code,
but for multiply by 4,8, ... using a shift is bad and for code size and for
speed. 

I think this optimization should not be hard coded, but should be chosen
based on the insn cost data. Perhaps there are other targets, which is better
to use multiplication rather than a shift.

Anatoly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39250



[Bug target/34299] [avr] ICE on function attribute syntax for main()

2009-02-27 Thread aesok at gcc dot gnu dot org


--- Comment #12 from aesok at gcc dot gnu dot org  2009-02-27 16:25 ---
2007-04-05  Anatoly Sokolov 

PR target/25448
* config/avr/avr.c (avr_handle_fndecl_attribute): Use the
DECL_ASSEMBLER_NAME, not the DECL_NAME.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34299



[Bug target/34299] [avr] ICE on function attribute syntax for main()

2009-03-02 Thread aesok at gcc dot gnu dot org


--- Comment #13 from aesok at gcc dot gnu dot org  2009-03-02 21:54 ---
*** Bug 38558 has been marked as a duplicate of this bug. ***


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jw at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34299



[Bug target/38558] [avr] ICE on function attribute syntax for __vectorN()

2009-03-02 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2009-03-02 21:54 ---


*** This bug has been marked as a duplicate of 34299 ***


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38558



[Bug target/34299] [avr] ICE on function attribute syntax for main()

2009-03-14 Thread aesok at gcc dot gnu dot org


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |aesok at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34299



[Bug target/34299] [avr] ICE on function attribute syntax for main()

2009-03-15 Thread aesok at gcc dot gnu dot org


--- Comment #14 from aesok at gcc dot gnu dot org  2009-03-15 13:09 ---
Subject: Bug 34299

Author: aesok
Date: Sun Mar 15 13:09:44 2009
New Revision: 144870

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144870
Log:
PR target/34299
* config/avr/avr.c (avr_handle_fndecl_attribute): Move code for
generate a warning if the function name does not begin with
"__vector" and the function has either the 'signal' or 'interrupt'
attribute, from here to ...
(avr_declare_function_name): ...here. New function.
* config/avr/avr.h (ASM_DECLARE_FUNCTION_NAME): Redefine.
* config/avr/avr-protos.h (avr_declare_function_name): Declare.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-protos.h
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34299



[Bug target/34299] [avr] ICE on function attribute syntax for main()

2009-03-15 Thread aesok at gcc dot gnu dot org


--- Comment #15 from aesok at gcc dot gnu dot org  2009-03-15 13:14 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34299



[Bug target/34412] ICE in extract_insn, at recog.c:1990

2009-08-25 Thread aesok at gcc dot gnu dot org


--- Comment #8 from aesok at gcc dot gnu dot org  2009-08-25 19:04 ---
Subject: Bug 34412

Author: aesok
Date: Tue Aug 25 19:03:53 2009
New Revision: 151094

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151094
Log:
PR target/34412
* config/avr/avr.c (expand_epilogue): Use correct QI mode frame
pointer for tiny stack.

Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34412



[Bug target/32335] libgcc build failure, ICE in cselib_record_set, at cselib.c:1508

2007-06-18 Thread aesok at gcc dot gnu dot org


--- Comment #8 from aesok at gcc dot gnu dot org  2007-06-18 13:33 ---
Im working on patch for avr target.

Anatoly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32335



[Bug target/32335] libgcc build failure, ICE in cselib_record_set, at cselib.c:1508

2007-06-29 Thread aesok at gcc dot gnu dot org


--- Comment #15 from aesok at gcc dot gnu dot org  2007-06-29 20:06 ---
Subject: Bug 32335

Author: aesok
Date: Fri Jun 29 20:05:56 2007
New Revision: 126121

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126121
Log:
PR target/32335
* config/avr/avr.c: Include dataflow header file.
(expand_prologue): Adjust for prologue insn change.
* config/avr/avr.md (call_prologue_saves): Only modify REG_SP once
inside a insn.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32335



[Bug target/32335] libgcc build failure, ICE in cselib_record_set, at cselib.c:1508

2007-06-29 Thread aesok at gcc dot gnu dot org


--- Comment #16 from aesok at gcc dot gnu dot org  2007-06-29 20:15 ---
Fixed for avr target.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32335



[Bug target/31331] [avr] ICE on function attribute syntax for main()

2007-07-04 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2007-07-04 21:10 ---
Subject: Bug 31331

Author: aesok
Date: Wed Jul  4 21:10:28 2007
New Revision: 126337

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126337
Log:
PR target/31331
* config/avr/avr.c (avr_naked_function_p): Handle receiving a type
rather than a decl. 
(avr_attribute_table): Make "naked" attribute apply to function types
rather than to decls.
(avr_handle_fntype_attribute): New function.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31331



[Bug target/31331] [avr] ICE on function attribute syntax for main()

2007-07-07 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2007-07-07 19:30 ---
Subject: Bug 31331

Author: aesok
Date: Sat Jul  7 19:30:37 2007
New Revision: 126446

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126446
Log:
PR target/31331
* config/avr/avr.c (avr_naked_function_p): Handle receiving a type
rather than a decl. 
(avr_attribute_table): Make "naked" attribute apply to function types
rather than to decls.
(avr_handle_fntype_attribute): New function.


Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31331



[Bug target/31331] [avr] ICE on function attribute syntax for main()

2007-07-07 Thread aesok at gcc dot gnu dot org


--- Comment #7 from aesok at gcc dot gnu dot org  2007-07-07 19:37 ---
Fixed.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31331



[Bug target/31331] [avr] ICE on function attribute syntax for main()

2007-07-07 Thread aesok at gcc dot gnu dot org


--- Comment #8 from aesok at gcc dot gnu dot org  2007-07-07 19:39 ---
Subject: Bug 31331

Author: aesok
Date: Sat Jul  7 19:39:36 2007
New Revision: 126447

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126447
Log:
PR target/31331
* config/avr/avr.c (avr_naked_function_p): Handle receiving a type
rather than a decl. 
(avr_attribute_table): Make "naked" attribute apply to function types
rather than to decls.
(avr_handle_fntype_attribute): New function.


Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/avr/avr.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31331



[Bug pending/41998] GCC 4.6 pending patches meta-bug

2009-12-05 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2009-12-05 17:15 ---
Patch to turn TARGET_FUNCTION_VALUE_REGNO_P macro into a hook.

http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00729.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41998



[Bug target/36424] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-02 Thread aesok at gcc dot gnu dot org
Testcase:
#include 
#include 

volatile unsigned char   UART_RxChar;
volatile unsigned char   UART_ReceivedChar;

SIGNAL(SIG_USART_RECV)  
{
/* Indicate that the UART has received a character */
UART_ReceivedChar = 1;
/* Store received character */
UART_RxChar = UDR;
}

Request: use -frename-registers optimization, enabled on -O3.

Result code:
.global __vector_13
 .type __vector_13, @function
__vector_13:
.LFB2:
.LM1:
 push __zero_reg__
 push r0
 in r0,__SREG__
 push r0
 clr __zero_reg__
 push r24
/* prologue: Signal */
/* frame size = 0 */
.LM2:
 ldi r26,lo8(1)
 sts UART_ReceivedChar,r26
.LM3:
 lds r24,198
 sts UART_RxChar,r24
/* epilogue start */
.LM4:
 pop r24
 pop r0
 out __SREG__,r0
 pop r0
 pop __zero_reg__
 reti

R26 register used in ISR but don't saved/restored.

To fix bug, need define HARD_REGNO_RENAME_OK macro in config/avr.h

Anatoly.


-- 
   Summary: avr-gcc use don't saved registers in ISR with -O3 ('-
frename-registers' ) optimization
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: aesok at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424



[Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-02 Thread aesok at gcc dot gnu dot org


--- Comment #1 from aesok at gcc dot gnu dot org  2008-06-02 18:06 ---
Created an attachment (id=15713)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15713&action=view)
The patch for 36424


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |aesok at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424



[Bug target/36423] New: avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-02 Thread aesok at gcc dot gnu dot org
Testcase:
#include 
#include 

volatile unsigned char   UART_RxChar;
volatile unsigned char   UART_ReceivedChar;

SIGNAL(SIG_USART_RECV)  
{
/* Indicate that the UART has received a character */
UART_ReceivedChar = 1;
/* Store received character */
UART_RxChar = UDR;
}

Request: use -frename-registers optimization, enabled on -O3.

Result code:
.global __vector_13
 .type __vector_13, @function
__vector_13:
.LFB2:
.LM1:
 push __zero_reg__
 push r0
 in r0,__SREG__
 push r0
 clr __zero_reg__
 push r24
/* prologue: Signal */
/* frame size = 0 */
.LM2:
 ldi r26,lo8(1)
 sts UART_ReceivedChar,r26
.LM3:
 lds r24,198
 sts UART_RxChar,r24
/* epilogue start */
.LM4:
 pop r24
 pop r0
 out __SREG__,r0
 pop r0
 pop __zero_reg__
 reti

R26 register used in ISR but don't saved/restored.

To fix bug, need define HARD_REGNO_RENAME_OK macro in config/avr.h

Anatoly.


-- 
   Summary: avr-gcc use don't saved registers in ISR with -O3 ('-
frename-registers' ) optimization
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: aesok at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36423



[Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-08 Thread aesok at gcc dot gnu dot org


--- Comment #3 from aesok at gcc dot gnu dot org  2008-06-08 16:08 ---
Subject: Bug 36424

Author: aesok
Date: Sun Jun  8 16:08:08 2008
New Revision: 136562

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136562
Log:
PR target/36424
* config/avr/avr.h (HARD_REGNO_RENAME_OK): Define.
* config/avr/avr.c (avr_hard_regno_rename_ok): New function. 
* config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype. 

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-protos.h
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424



[Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-15 Thread aesok at gcc dot gnu dot org


--- Comment #5 from aesok at gcc dot gnu dot org  2008-06-15 21:33 ---
Subject: Bug 36424

Author: aesok
Date: Sun Jun 15 21:32:29 2008
New Revision: 136826

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136826
Log:
PR target/36424
* config/avr/avr.h (HARD_REGNO_RENAME_OK): Define.
* config/avr/avr.c (avr_hard_regno_rename_ok): New function. 
* config/avr/avr-protos.h (avr_hard_regno_rename_ok): New prototype. 

Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/avr/avr-protos.h
branches/gcc-4_3-branch/gcc/config/avr/avr.c
branches/gcc-4_3-branch/gcc/config/avr/avr.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424



[Bug target/36424] avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization

2008-06-15 Thread aesok at gcc dot gnu dot org


--- Comment #6 from aesok at gcc dot gnu dot org  2008-06-15 21:36 ---
Fixed for 4.3.2.


-- 

aesok at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.4.0   |4.3.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36424