Re: [avr-gcc-list] Re: loop deleted using optimization

2007-03-07 Thread Joerg Wunsch
Ben Jackson [EMAIL PROTECTED] wrote:

 It would probably work to add an empty asm, as long as you used the
 __volatile attribute to scare gcc away from reordering code in the
 loop.

asm volatile(:::memory);

works.  However, as others already noted, the functions from
util/delay.h are preferrable, as their execution cycle count is
simply known beforehand.

-- 
cheers, Jorg   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-07 Thread Shaun Jackman

On 3/6/07, Dmitry K. [EMAIL PROTECTED] wrote:

Hi,

wrong code by avr-gcc 4.1.1:

...

I tested your snippet and found that GCC 4.1.0 produced incorrect
code, and GCC 4.3.0 20070226 from subversion produced correct code.
So, it looks as if this bug has been found and fixed.

Cheers,
Shaun


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-07 Thread Eric Weddington
 

 -Original Message-
 From: 
 [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]
 org] On Behalf Of Shaun Jackman
 Sent: Wednesday, March 07, 2007 3:04 PM
 To: Dmitry K.
 Cc: avr-gcc-list@nongnu.org
 Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
 
 On 3/6/07, Dmitry K. [EMAIL PROTECTED] wrote:
  Hi,
 
  wrong code by avr-gcc 4.1.1:
 ...
 
 I tested your snippet and found that GCC 4.1.0 produced incorrect
 code, and GCC 4.3.0 20070226 from subversion produced correct code.
 So, it looks as if this bug has been found and fixed.


Hi Shaun,

Thanks a lot for doing the leg work on this!

But I have a favor to ask: Can you find out approximately *when* this got
fixed? i.e., can you test 4.1.2, and the current 4.2.x branch to see if it's
fixed at either of those two points?

Thanks,
Eric



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-07 Thread Shaun Jackman

On 3/7/07, Eric Weddington [EMAIL PROTECTED] wrote:

Hi Shaun,

Thanks a lot for doing the leg work on this!

But I have a favor to ask: Can you find out approximately *when* this got
fixed? i.e., can you test 4.1.2, and the current 4.2.x branch to see if it's
fixed at either of those two points?

Thanks,
Eric


Hi Eric,

I'd love to help out, but don't have the time at the moment. I'm busy
finishing off projects before going on vacation.

Cheers,
Shaun


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] Documentation on avrdude

2007-03-07 Thread Juergen Harms

I started doing part of my home-work: looking into the incorrect
representation of the avrdude man-page by konqueror.

The problem is far more general than I had realised initially: the
first line of many (most?) items describing an option are messed up.
For instance:

The troff line
.It Fl b Ar baudrate

is shown in man (correctly) as
-b baudrate(baudrate in bold face)

and in konqueror (incorrectly) as
-b -file ... -baudrate   (baudrate in normal face)

These problems are due (my conjecture) to the use of macros in the
troff text of the avrdude man-page that are not part of the list of
macros defined in the list of valid macros for use in man-pages
(see man(7)). I guess that this is due to the BSD background of this
development, I found remarks that BSD has a specific culture or rich
sets of macro definitions.

man (and similar tools like man2html) come from the common past of BSD
and Linux - hence deals correctly with the exotic macros, Konqueror
(the KDE standard browser and standard KDE tool for reading man-pages)
does not (btw, the problem is not specific to Mandriva: I also have a
Ubuntu partition on my machine, same problem there; I am pretty sure
that the same thing will apply also to Suse).

Possible solutions

(a) modify konqueror: unrealistic and a prohibitive effort, would
probably result in a special version of konqueror impossible to maintain
as KDE evolves - forget it.

(b) modify the troff text of the man-page by adding macro definition
that define the exotic macros and reduce them to macros that are
valid for man - I do not know enough about troff macros to do this,
and I think a lot of messy work.

(c) re-write the troff text and replace the exotic macros by valid
macros - probably a couple of hours work which I could do - but is
it worth while? and, Joerg, you as a maintainer would get a baby which
you might not like (have a look at the troff text of avr-gdb: text using 
standard macros is messy and far less elegant than the BSD -macro based

text).

At present, just put up a big warning: KDE users must not use konqueror 
when they look at the avrdude man-page; a workaround for using a decent 
tool for looking at this man-page is to feed the original text through 
man2html and than use the resulting html page. That is my present 
solution, with a bookmark for rapid access.



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list