[Bug c/23605] New: memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
ct: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kevin at planetsaphire dot com CC: gcc-bugs at gcc dot gnu dot org GCC build t

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-28 20:18 --- Created an attachment (id=9604) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9604&action=view) Testcases and .i Files of uchar.* This attatchment contains only the source files of my proj

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-28 20:26 --- (In reply to comment #1) > Are you compiling your source at -O0 or GCC at -O0? If the former, then this is most likely not a bug. -O2 does not do any optimization at all, and -O0 optimizes the code t

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-28 20:34 --- (In reply to comment #4) > You are compiling at -O0 so this is not a bug and we don't care that much about code generation at > -O0. So you're invalidating this bug because -O0 optimizes t

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-28 21:58 --- (In reply to comment #6) > inlining memset is not an optimization as most OS's memsets are better than the inlined version, using > sse registers,etc. I have finished reviewing over the g

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-29 00:16 --- err... I meant "get rid of the pushpop instructions for ebx" because ebx wouldn't be used (probably taken care of automatically anyway) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23605

[Bug target/23605] memset() Optimization on x86-32 bit

2005-08-28 Thread kevin at planetsaphire dot com
--- Additional Comments From kevin at planetsaphire dot com 2005-08-29 00:36 --- Also, is setting %eax to $0 once per memset good enough? I don't think the "stos" instruction would reset %eax... the resulting assembly code in tektester.386.s is the same