[Bug middle-end/65082] Wasted cycles when using a register based varible

2015-02-22 Thread NickParker at Eaton dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65082 --- Comment #4 from NickParker at Eaton dot com --- That was with 's' optimisation, and it does the sames for optimisation level '1'.

[Bug middle-end/65082] Wasted cycles when using a register based varible

2015-02-22 Thread NickParker at Eaton dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65082 --- Comment #3 from NickParker at Eaton dot com --- register uint16_t r4 asm ("r4"); register uint16_t r6 asm ("r6"); volatile int8_t localOscCosine; volatile int8_t acInput; void pllExec(void) { int16_t mix_out

[Bug c/65082] New: Wasted cycles when using a register based varible

2015-02-16 Thread NickParker at Eaton dot com
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: NickParker at Eaton dot com gcc version 4.8.0 20130306 (experimental) (GCC) Was just playing around and found this. When using a register based variable, the compiler misses an obvious optimisation. Notice in

[Bug c/57931] New: There are superfluous movw instructions in when using GCC-AVR (WinAVR) asm code.

2013-07-18 Thread NickParker at Eaton dot com
: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: NickParker at Eaton dot com Created attachment 30526 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30526&action=edit C code and a listing There are supe

[Bug c/50314] GCC changes order of code so it does not work as intended

2011-09-07 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50314 --- Comment #6 from NickParker at Eaton dot com 2011-09-07 21:18:59 UTC --- >> How is TCNT1 defined? Again just attach the preprocessed source. Sorry, not sure how to get preprocessed source - I need to read the GCC manual. >From A

[Bug c/50314] GCC changes order of code so it does not work as intended

2011-09-07 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50314 --- Comment #5 from NickParker at Eaton dot com 2011-09-07 21:16:02 UTC --- So if its not a bug, what is the solution to this problem? I tried wrapping up the code I wanted to time in a separate C function, but the compiler still optimised my

[Bug c/50314] GCC changes order of code so it does not work as intended

2011-09-07 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50314 --- Comment #3 from NickParker at Eaton dot com 2011-09-07 21:13:22 UTC --- #define T1_GET_TIMER_NON_ATOMIC() (TCNT1) uint16_t BGndTimerReadNowIsr(void) { uint16_t period_u2; period_u2 = T1_GET_TIMER_NON_ATOMIC(); return(period_u2); }

[Bug c/50314] New: GCC changes order of code so it does not work as intended

2011-09-07 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50314 Bug #: 50314 Summary: GCC changes order of code so it does not work as intended Classification: Unclassified Product: gcc Version: 4.3.3 Status: UNCONFIRMED

[Bug target/50256] AVR GCC - several unnecessary register moves

2011-09-04 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50256 --- Comment #5 from NickParker at Eaton dot com 2011-09-04 21:29:40 UTC --- Thanks, also was able to add a few movws to save cycles. Nick.

[Bug target/50256] AVR GCC - several unnecessary register moves

2011-09-04 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50256 --- Comment #4 from NickParker at Eaton dot com 2011-09-04 21:27:43 UTC --- Hi, Thanks for your input and sorry to make a mess of reporting this. The arithmetic is fine and the code gives the results I expect. However, I have since discovered and

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-04 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #10 from NickParker at Eaton dot com 2011-09-04 21:22:30 UTC --- Richard, 'bogus' isnt a technical term I'm familiar with - I'm not entirely sure what you mean, however, I have found the problem with my ASM code.

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #8 from NickParker at Eaton dot com 2011-09-03 04:46:45 UTC --- Please ignore the r10/r20 guff I was experimenting. I later realised the muls3s3u3 code gives the right answer, the problem occurs later on somehow the registers where the

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #7 from NickParker at Eaton dot com 2011-09-03 04:45:08 UTC --- Please ignore the r10/r20 guff I was experimenting. I later realised the muls3s3u3 code gives the right answer, the problem occurs later on somehow Nick.

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #5 from NickParker at Eaton dot com 2011-09-03 01:32:20 UTC --- Sorry. I pasted a broken version. Before. Code below works. uint32_t MulU3U3S3(uint32_t a_u4, uint32_t b_u4) { //uint32_t answer; asm volatile

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #4 from NickParker at Eaton dot com 2011-09-03 01:30:26 UTC --- Hi Andrew, Can you please explain what you mean by %1 and %2. Thanks.

[Bug target/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 --- Comment #3 from NickParker at Eaton dot com 2011-09-03 01:28:57 UTC --- The final printed calculation result of MulU3U3S3() is wrong, because two of the four result registers are incorrect and have been overwritten. "mulu3u3s3 : [ +00167

[Bug c/50281] result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 NickParker at Eaton dot com changed: What|Removed |Added Component|inline-asm |c Severity|normal

[Bug c/50281] New: result registers are overwritten giving incorrect result

2011-09-02 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50281 Bug #: 50281 Summary: result registers are overwritten giving incorrect result Classification: Unclassified Product: gcc Version: 4.3.3 Status: UNCONFIRMED

[Bug target/50256] AVR GCC - several unnecessary register moves

2011-09-01 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50256 --- Comment #2 from NickParker at Eaton dot com 2011-09-01 21:30:41 UTC --- I have the latest AVR GCC release from 2010-01-10 (4.3.3) and this is what I am using.

[Bug c/50256] New: AVR GCC - several unnecessary register moves

2011-08-31 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50256 Bug #: 50256 Summary: AVR GCC - several unnecessary register moves Classification: Unclassified Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Prior

[Bug c/50223] New: AVRGCC - dont clear r26 and r27.....its a (small) waste of CPU cycles.

2011-08-28 Thread NickParker at Eaton dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50223 Bug #: 50223 Summary: AVRGCC - dont clear r26 and r27.its a (small) waste of CPU cycles. Classification: Unclassified Product: gcc Version: unknown Status: UNCONF