Re: [avr-gcc-list] Optimisation help

2008-01-21 Thread Wouter van Gulik
Magnus Johansson schreef: I totally get the second and third reads. But the first one, just moving r24 to r17 will only work if r24 is only 0x00 or 0x01 not otherwise...? What should I do? Well I can't see all assembler so this is a bit of a guess. GCC is probably going to do a

Re: [avr-gcc-list] How to get low byte off a function address?

2008-01-21 Thread Wouter van Gulik
Erik Christiansen schreef: On Sat, Jan 19, 2008 at 04:15:35PM +0100, Wouter van Gulik wrote: How do I do such a thing? Using the lower 8 bits is possible when loading a register so why not in a table? In the past, we've encountered other relocations that aren't handled by the avr port of

Re: [avr-gcc-list] testsuite needs sys/types.h

2008-01-21 Thread Preston Wilson
Anyway, some tests in gcc.c-torture/execute/builtins fail because they are expecting a sys/types.h include file. I manually added a sys/types.h file to my avr-libc with just: #include inttypes.h #include stdint.h and the testsuite passed a lot more tests from this section. The

[avr-gcc-list] local variables in ddd

2008-01-21 Thread Javier Almansa Sobrino
Hi everyone. I'm trying to simulate and trace a program developed with avr-gcc, but I'm not able to see the value of any local variable with ddd or avr-gdb. when I wrote print variable I obtain this: No symbol variable in current context. Anyone knows how to fix it? thanks -- Nunca confies

Re: [avr-gcc-list] local variables in ddd

2008-01-21 Thread Andrew Hutchinson
It is possible that you have optimization turned on - so gcc will put variables into register. Or, perhaps your code has used variables it did not need and gcc will optimise them away. For example: int i for (i=0;i1000;i++); will dissappear. -O0 (or optimisation 0) will stop this but code

Re: [avr-gcc-list] Optimisation help

2008-01-21 Thread Joerg Wunsch
Magnus Johansson [EMAIL PROTECTED] wrote: What should I do? Post the entire function's C code as well as the resulting assembly -- without the obfuscating .lss style. (I'd personally prefer seeing the generated assembly rather than the disassembled, but others might have a different opinion on

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Andrew Hutchinson
The bug with PR27364 testcase appears recent. It fails with my 4.3 experimental copy 13/12/2007 Ok with avr-gcc (GCC) 4.2.2 (WinAVR 20071221) reduced testcase is: long f2(long number_of_digits_to_use) { return ( number_of_digits_to_use * 11L ) ; }

Re: [avr-gcc-list] Whetstone Benchmark

2008-01-21 Thread Dmitry K.
On Monday 21 January 2008 11:00, Weddington, Eric wrote: A couple of quick comments/suggestions: - Please drop -morder1. We generally don't recommend this to users, and it looks like it really doesn't affect the results that much - Can you also try with avr-gc 4.2.2 and avr-libc 1.6.1? These

[avr-gcc-list] local variables in ddd

2008-01-21 Thread Javier Almansa Sobrino
Hi everyone. I'm trying to simulate and trace a program developed with avr-gcc, but I'm not able to see the value of any local variable with ddd or avr-gdb. when I wrote print variable I obtain this: No symbol variable in current context. Anyone knows how to fix it? thanks -- Nunca confies

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Andy Hutchinson
Paulo, please report bug with PR27364 testcase. I found that problem is somewhere in combine phase. Here it is trying to stick together pairs of instruction to make another. It fails but that is where load of constant dissappears. So if you post bug, I can add further info. Andy PS

Re: [avr-gcc-list] local variables in ddd

2008-01-21 Thread Gre7g Luterman
--- Javier Almansa Sobrino [EMAIL PROTECTED] wrote: Hi everyone. I'm trying to simulate and trace a program developed with avr-gcc, but I'm not able to see the value of any local variable with ddd or avr-gdb. This is a common problem that is not simply solved. gcc is optimizing your code

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Paulo Marques
Quoting Andrew Hutchinson [EMAIL PROTECTED]: Here are my test results using Paulo simulator. Seems I have more tests! I'm now running from SVN, so I'm always testing the latest version, although my initial report was for gcc 4.2.2. One thing I noticed is that almost everyday there is a

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Paulo Marques
Quoting Andrew Hutchinson [EMAIL PROTECTED]: The bug with PR27364 testcase appears recent. It fails with my 4.3 experimental copy 13/12/2007 Ok with avr-gcc (GCC) 4.2.2 (WinAVR 20071221) This got me thinking: it would be really nice if we could setup an automated bisection test. We could

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Paulo Marques Sent: Monday, January 21, 2008 5:15 PM To: Andrew Hutchinson Cc: avr-gcc-list@nongnu.org; Andy Hutchinson Subject: Re: [avr-gcc-list] More results from the testsuite with

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Paulo Marques Sent: Monday, January 21, 2008 5:14 PM To: Andrew Hutchinson Cc: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] More results from the testsuite with avrtest One

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Andrew Hutchinson
- created a sys/types.h with: #include inttypes.h #include stdint.h where do I put new include file? (directory relative to prefix root) I have updated my GCC to same rev as you. Ok with ldflags changes So hopefully I can re-run in sync with you. Andy

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Paulo Marques
Quoting Weddington, Eric [EMAIL PROTECTED]: [...] Ok, to try to synchronize with you, so that our tests are consistent, I'm running a test against svn revision 131704 (from today). Changes I've made so far to solve some of the failures: - created a sys/types.h with: #include inttypes.h

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Weddington, Eric
-Original Message- From: Paulo Marques [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 6:14 PM To: Weddington, Eric Cc: Andrew Hutchinson; avr-gcc-list@nongnu.org Subject: RE: [avr-gcc-list] More results from the testsuite with avrtest Thanks, but please bare in

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Andrew Hutchinson
Ok my latest build is squawking - I assume because my binutils is out of step. ../../../../gcc/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode mov w for mcu avr3 To make this painless, can someone please point me at correct sources for binutils - and assocated patch set (one

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Andrew Hutchinson Sent: Monday, January 21, 2008 6:56 PM To: Paulo Marques; avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] More results from the testsuite with avrtest Ok my latest

Re: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Paulo Marques
Quoting Andrew Hutchinson [EMAIL PROTECTED]: - created a sys/types.h with: #include inttypes.h #include stdint.h where do I put new include file? (directory relative to prefix root) In Linux, the default dir is /usr/local/avr/include so the full path for the file becomes

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Paulo Marques
Quoting Weddington, Eric [EMAIL PROTECTED]: Ok my latest build is squawking - I assume because my binutils is out of step. ../../../../gcc/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode mov w for mcu avr3 To make this painless, can someone please point me at correct sources for

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread John Regehr
Please see the GCC project about this. IIRC, they already have a script that does a binary search on failing test cases. IIRC, it is in the contrib subdirectory. Also this Delta implementation is very useful for minimizing an offending test program (either before or after narrowing settling

RE: [avr-gcc-list] More results from the testsuite with avrtest

2008-01-21 Thread Weddington, Eric
-Original Message- From: John Regehr [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 8:58 PM To: Weddington, Eric Cc: Paulo Marques; Andrew Hutchinson; avr-gcc-list@nongnu.org; Andy Hutchinson Subject: RE: [avr-gcc-list] More results from the testsuite with avrtest