<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2012</id>
	<title>Nabble - AVR - Libc - Dev</title>
	<updated>2009-11-30T14:41:39Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/AVR---Libc---Dev-f2012.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/AVR---Libc---Dev-f2012.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26583431</id>
	<title>[bug #28135] malloc(): expand the last free chunk when expanding __brkval</title>
	<published>2009-11-30T14:41:39Z</published>
	<updated>2009-11-30T14:41:39Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Additional Item Attachment, bug #28135 (project avr-libc):
&lt;br&gt;&lt;br&gt;File name: bug-28135.diff &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size:2 KB
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28135&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28135&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26583431&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28135--malloc%28%29%3A-expand-the-last-free-chunk-when-expanding-__brkval-tp26583404p26583431.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26583404</id>
	<title>[bug #28135] malloc(): expand the last free chunk when expanding __brkval</title>
	<published>2009-11-30T14:38:06Z</published>
	<updated>2009-11-30T14:38:06Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;URL:
&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28135&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28135&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Summary: malloc(): expand the last free chunk when expanding
&lt;br&gt;__brkval
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: AVR C Runtime Library
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted by: kanchev
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted on: Mon 30 Nov 2009 10:38:05 PM GMT
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Category: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Severity: 3 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: 5 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item Group: libc code
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Percent Complete: 100%
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assigned to: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Open/Closed: Open
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Discussion Lock: Any
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Release: 1.7.*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fixed Release: None
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Details:
&lt;br&gt;&lt;br&gt;This bug covers the situation described in patch #6895 and bug #27235.
&lt;br&gt;I've added an alternative patch for this bug and a test case for
&lt;br&gt;regressions.
&lt;br&gt;&lt;br&gt;Quote from patch #6895:
&lt;br&gt;&amp;quot;Situation:
&lt;br&gt;a = malloc(10);
&lt;br&gt;b = malloc(10);
&lt;br&gt;free(b);
&lt;br&gt;Now there is a free chunk at the end of the used area of the heap.
&lt;br&gt;b = malloc(20);
&lt;br&gt;The new request can not be satisfied by any free chunk, therefore the used
&lt;br&gt;area needs to be expanded.&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;File Attachments:
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------
&lt;br&gt;Date: Mon 30 Nov 2009 10:38:05 PM GMT &amp;nbsp;Name:
&lt;br&gt;malloc-expand-last-free-chunk.diff &amp;nbsp;Size: 702B &amp;nbsp; By: kanchev
&lt;br&gt;make malloc() expand the last free chunk when expanding __brkval
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/download.php?file_id=19165&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/download.php?file_id=19165&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28135&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28135&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26583404&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28135--malloc%28%29%3A-expand-the-last-free-chunk-when-expanding-__brkval-tp26583404p26583404.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580082</id>
	<title>[bug #25723] Realloc corrupts free list when growing into the next free item</title>
	<published>2009-11-30T10:40:34Z</published>
	<updated>2009-11-30T10:40:34Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Follow-up Comment #8, bug #25723 (project avr-libc):
&lt;br&gt;&lt;br&gt;Stefan Ernst came across the same regression and filed it as bug #27242. I've
&lt;br&gt;posted a patch there which should fix the problem.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?25723&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?25723&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580082&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--25723--Realloc-corrupts-free-list-when-growing-into-the-next-free-item-tp22257867p26580082.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580071</id>
	<title>[bug #27242] realloc: serious error when size shrinks</title>
	<published>2009-11-30T10:36:02Z</published>
	<updated>2009-11-30T10:36:02Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Follow-up Comment #2, bug #27242 (project avr-libc):
&lt;br&gt;&lt;br&gt;I've attached a patch and a regression test for this bug. The patch passes my
&lt;br&gt;test cases and also the test cases of bug #25723 which caused this
&lt;br&gt;regression.
&lt;br&gt;&lt;br&gt;This was a very serious bug, I hope that all of it is fixed now.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?27242&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?27242&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580071&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--27242--realloc%3A-serious-error-when-size-shrinks-tp24955234p26580071.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580024</id>
	<title>[bug #27242] realloc: serious error when size shrinks</title>
	<published>2009-11-30T10:25:35Z</published>
	<updated>2009-11-30T10:25:35Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Additional Item Attachment, bug #27242 (project avr-libc):
&lt;br&gt;&lt;br&gt;File name: bug-27242.diff &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size:2 KB
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?27242&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?27242&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580024&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--27242--realloc%3A-serious-error-when-size-shrinks-tp24955234p26580024.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580020</id>
	<title>[bug #27242] realloc: serious error when size shrinks</title>
	<published>2009-11-30T10:22:53Z</published>
	<updated>2009-11-30T10:22:53Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Additional Item Attachment, bug #27242 (project avr-libc):
&lt;br&gt;&lt;br&gt;File name: realloc-regression-25723.diff &amp;nbsp;Size:1 KB
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?27242&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?27242&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580020&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--27242--realloc%3A-serious-error-when-size-shrinks-tp24955234p26580020.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26573634</id>
	<title>Re: Re: [bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T04:01:49Z</published>
	<updated>2009-11-30T04:01:49Z</updated>
	<author>
		<name>Jan Waclawek</name>
	</author>
	<content type="html">David,
&lt;br&gt;&lt;br&gt;&amp;gt;This is a closer but it is still not enough to be able to help you. &amp;nbsp;We 
&lt;br&gt;&amp;gt;need a code /snippet/ - cut down the code to the minimal necessary so 
&lt;br&gt;&amp;gt;that we can compile the code and see the problem. &amp;nbsp;
&lt;br&gt;&lt;br&gt;There is no point in forcing the OP to do so. The bug is related to an extensive use of registers by attempt of the optimiser to keep &amp;quot;common subexpressions&amp;quot; (constants) across the function, combined with error in choice of &amp;quot;upper&amp;quot; register to load a constant; and is hard to reproduce in a simplified setup.
&lt;br&gt;&lt;br&gt;The attachment is fully justified here.
&lt;br&gt;&lt;br&gt;Please refer to the discussion at avrfreaks.net for further details.
&lt;br&gt;&lt;br&gt;Please note, that citing a lengthy post in full in your response is no better bandwidth-wise than posting attachments to the bug tracker.
&lt;br&gt;&lt;br&gt;Jan Waclawek
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26573634&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26573634.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26573489</id>
	<title>Re: [bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T03:47:42Z</published>
	<updated>2009-11-30T03:47:42Z</updated>
	<author>
		<name>Jan Waclawek</name>
	</author>
	<content type="html">Please follow the avrfreaks link given by OP for further discussion and a link to a similar bug already reported and apparently solved.
&lt;br&gt;&lt;br&gt;JW
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26573489&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26573489.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26573424</id>
	<title>Re: [bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T03:43:16Z</published>
	<updated>2009-11-30T03:43:16Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">Hi Brn,
&lt;br&gt;&lt;br&gt;This is a closer but it is still not enough to be able to help you. &amp;nbsp;We 
&lt;br&gt;need a code /snippet/ - cut down the code to the minimal necessary so 
&lt;br&gt;that we can compile the code and see the problem. &amp;nbsp;Your code below won't 
&lt;br&gt;compile because it is missing some defines, and it has lots more code 
&lt;br&gt;making it hard to see where the problem might lie. &amp;nbsp;It could well be 
&lt;br&gt;that your code here (once you've included the missing defines) /is/ the 
&lt;br&gt;minimal code that shows the error, in which case adding the missing 
&lt;br&gt;parts should be easy enough.
&lt;br&gt;&lt;br&gt;You are also missing the compile flags and the compiler version. 
&lt;br&gt;Without these, we can't replicate the error or give useful advice (such 
&lt;br&gt;as alternative compiler flags to try).
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Brn Gomes wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Follow-up Comment #1, bug #28108 (project avr-libc):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I want a CAN msg with ID=0xFDFFFFF0 on msg2
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; it sends 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ID=0xFDFDFFF0.... 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #define TEST_CAN_MSG1_ID 0xFDFFFFE0L 
&lt;br&gt;&amp;gt; #define TEST_CAN_MSG2_ID 0xFDFFFFD0L 
&lt;br&gt;&amp;gt; #define TEST_CAN_MSG3_ID 0xFDFFFFC0L 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #define TEST_CAN_TX_MSG0_ID TEST_CAN_MSG3_ID 
&lt;br&gt;&amp;gt; #define TEST_CAN_TX_MSG1_ID TEST_CAN_MSG1_ID 
&lt;br&gt;&amp;gt; #define TEST_CAN_TX_MSG2_ID TEST_CAN_MSG2_ID 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; typedef struct 
&lt;br&gt;&amp;gt; { 
&lt;br&gt;&amp;gt; uint32_t id; 
&lt;br&gt;&amp;gt; uint32_t id_msk; 
&lt;br&gt;&amp;gt; uint8_t *data_ptr; 
&lt;br&gt;&amp;gt; uint8_t status; 
&lt;br&gt;&amp;gt; uint8_t proc; 
&lt;br&gt;&amp;gt; void *action_ptr; 
&lt;br&gt;&amp;gt; uint8_t max_size; 
&lt;br&gt;&amp;gt; uint8_t size; 
&lt;br&gt;&amp;gt; uint8_t mob_num; 
&lt;br&gt;&amp;gt; uint8_t wdlc; 
&lt;br&gt;&amp;gt; uint8_t mob_assign; 
&lt;br&gt;&amp;gt; } can_msg_t; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; static volatile can_msg_t can_tx_msg0; 
&lt;br&gt;&amp;gt; static volatile can_msg_t can_tx_msg1; 
&lt;br&gt;&amp;gt; static volatile can_msg_t can_tx_msg2; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; static volatile uint8_t can_buf_out_msg0[10]; 
&lt;br&gt;&amp;gt; static volatile uint8_t can_buf_out_msg1[10]; 
&lt;br&gt;&amp;gt; static volatile uint8_t can_buf_out_msg2[10]; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; funtion called in C code: 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; void InitCan(void){ 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* 
&lt;br&gt;&amp;gt; * Msg 0 
&lt;br&gt;&amp;gt; */ 
&lt;br&gt;&amp;gt; can_tx_msg0.id = TEST_CAN_TX_MSG0_ID; 
&lt;br&gt;&amp;gt; can_tx_msg0.data_ptr = (uint8_t *) can_buf_out_msg0; 
&lt;br&gt;&amp;gt; can_tx_msg0.max_size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg0.size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg0.status = NOT_SENT; 
&lt;br&gt;&amp;gt; can_tx_msg0.mob_num = 0; 
&lt;br&gt;&amp;gt; can_tx_msg0.mob_assign = FIXED_MOB; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* send dummy data... */ 
&lt;br&gt;&amp;gt; can_buf_out_msg0[0] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[1] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[2] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[3] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[4] = 0xDE; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[5] = 0xAD; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[6] = 0xFA; 
&lt;br&gt;&amp;gt; can_buf_out_msg0[7] = 0xCE; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* 
&lt;br&gt;&amp;gt; * Msg 1 
&lt;br&gt;&amp;gt; */ 
&lt;br&gt;&amp;gt; can_tx_msg1.id = TEST_CAN_TX_MSG1_ID; 
&lt;br&gt;&amp;gt; can_tx_msg1.data_ptr = (uint8_t *) can_buf_out_msg1; 
&lt;br&gt;&amp;gt; can_tx_msg1.max_size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg1.size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg1.status = NOT_SENT; 
&lt;br&gt;&amp;gt; can_tx_msg1.mob_assign = FLOATING_MOB; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* send dummy data... */ 
&lt;br&gt;&amp;gt; can_buf_out_msg1[0] = 0xDE; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[1] = 0xAD; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[2] = 0xFA; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[3] = 0xCE; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[4] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[5] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[6] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg1[7] = 0; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* 
&lt;br&gt;&amp;gt; * Msg 2 
&lt;br&gt;&amp;gt; */ 
&lt;br&gt;&amp;gt; can_tx_msg2.id = TEST_CAN_TX_MSG2_ID; 
&lt;br&gt;&amp;gt; can_tx_msg2.data_ptr = (uint8_t *) can_buf_out_msg2; 
&lt;br&gt;&amp;gt; can_tx_msg2.max_size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg2.size = 8; 
&lt;br&gt;&amp;gt; can_tx_msg2.status = NOT_SENT; 
&lt;br&gt;&amp;gt; can_tx_msg2.mob_assign = FLOATING_MOB; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /* send dummy data... */ 
&lt;br&gt;&amp;gt; can_buf_out_msg2[0] = 0xDE; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[1] = 0xAD; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[2] = 0xFA; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[3] = 0xCE; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[4] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[5] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[6] = 0; 
&lt;br&gt;&amp;gt; can_buf_out_msg2[7] = 0; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ......-----------......
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; the .lss file generated with the error at line 724:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; can_tx_msg2.id = TEST_CAN_TX_MSG2_ID; 
&lt;br&gt;&amp;gt; 71a:	00 ed ldi	r16, 0xD0	; 208 
&lt;br&gt;&amp;gt; 71c:	e0 2e mov	r14, r16 
&lt;br&gt;&amp;gt; 71e:	0f ef ldi	r16, 0xFF	; 255 
&lt;br&gt;&amp;gt; 720:	f0 2e mov	r15, r16 
&lt;br&gt;&amp;gt; 722:	0f ef ldi	r16, 0xFF	; 255 
&lt;br&gt;&amp;gt; 724:	00 2f mov	r16, r16 
&lt;br&gt;&amp;gt; 726:	0d ef ldi	r16, 0xFD	; 253 
&lt;br&gt;&amp;gt; 728:	10 2f mov	r17, r16 
&lt;br&gt;&amp;gt; 72a:	e0 92 0f 02 sts	0x020F, r14 
&lt;br&gt;&amp;gt; 72e:	f0 92 10 02 sts	0x0210, r15 
&lt;br&gt;&amp;gt; 732:	00 93 11 02 sts	0x0211, r16 
&lt;br&gt;&amp;gt; 736:	10 93 12 02 sts	0x0212, r17 
&lt;br&gt;&amp;gt; can_tx_msg2.data_ptr = (uint8_t *) can_buf_out_msg2; 
&lt;br&gt;&amp;gt; 73a:	86 e3 ldi	r24, 0x36	; 54 
&lt;br&gt;&amp;gt; 73c:	92 e0 ldi	r25, 0x02	; 2 
&lt;br&gt;&amp;gt; 73e:	90 93 18 02 sts	0x0218, r25 
&lt;br&gt;&amp;gt; 742:	80 93 17 02 sts	0x0217, r24 
&lt;br&gt;&amp;gt; can_tx_msg2.max_size = 8; 
&lt;br&gt;&amp;gt; 746:	60 93 1d 02 sts	0x021D, r22 
&lt;br&gt;&amp;gt; can_tx_msg2.size = 8; 
&lt;br&gt;&amp;gt; 74a:	60 93 1e 02 sts	0x021E, r22 
&lt;br&gt;&amp;gt; can_tx_msg2.status = NOT_SENT; 
&lt;br&gt;&amp;gt; 74e:	70 93 19 02 sts	0x0219, r23
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26573424&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26573424.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26573133</id>
	<title>[bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T03:23:57Z</published>
	<updated>2009-11-30T03:23:57Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Follow-up Comment #2, bug #28108 (project avr-libc):
&lt;br&gt;&lt;br&gt;brief problem summary:
&lt;br&gt;&lt;br&gt;I'm having a sort of a &amp;quot;bug&amp;quot; after compiling with winavr 2009-03-13 because i
&lt;br&gt;noticed that i wasn't receiving one specific CAN message for some reason. The
&lt;br&gt;reason was the msg_id on the transmitter was not correct so the receiver
&lt;br&gt;didn't &amp;quot;caught&amp;quot; any because the ID were diferent. But the main problem was
&lt;br&gt;that in code C was everything perfect but when I saw the assembly, there was
&lt;br&gt;some wrong stuff there (see below please). 
&lt;br&gt;The ID is a #define and for some reason r16 is wrongly changed into the last
&lt;br&gt;ID byte... making an erroneous ID.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26573133&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26573133.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26573061</id>
	<title>[bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T03:17:47Z</published>
	<updated>2009-11-30T03:17:47Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Follow-up Comment #1, bug #28108 (project avr-libc):
&lt;br&gt;&lt;br&gt;If I want a CAN msg with ID=0xFDFFFFF0 on msg2
&lt;br&gt;&lt;br&gt;it sends 
&lt;br&gt;&lt;br&gt;ID=0xFDFDFFF0.... 
&lt;br&gt;&lt;br&gt;#define TEST_CAN_MSG1_ID 0xFDFFFFE0L 
&lt;br&gt;#define TEST_CAN_MSG2_ID 0xFDFFFFD0L 
&lt;br&gt;#define TEST_CAN_MSG3_ID 0xFDFFFFC0L 
&lt;br&gt;&lt;br&gt;#define TEST_CAN_TX_MSG0_ID TEST_CAN_MSG3_ID 
&lt;br&gt;#define TEST_CAN_TX_MSG1_ID TEST_CAN_MSG1_ID 
&lt;br&gt;#define TEST_CAN_TX_MSG2_ID TEST_CAN_MSG2_ID 
&lt;br&gt;&lt;br&gt;typedef struct 
&lt;br&gt;{ 
&lt;br&gt;uint32_t id; 
&lt;br&gt;uint32_t id_msk; 
&lt;br&gt;uint8_t *data_ptr; 
&lt;br&gt;uint8_t status; 
&lt;br&gt;uint8_t proc; 
&lt;br&gt;void *action_ptr; 
&lt;br&gt;uint8_t max_size; 
&lt;br&gt;uint8_t size; 
&lt;br&gt;uint8_t mob_num; 
&lt;br&gt;uint8_t wdlc; 
&lt;br&gt;uint8_t mob_assign; 
&lt;br&gt;} can_msg_t; 
&lt;br&gt;&lt;br&gt;static volatile can_msg_t can_tx_msg0; 
&lt;br&gt;static volatile can_msg_t can_tx_msg1; 
&lt;br&gt;static volatile can_msg_t can_tx_msg2; 
&lt;br&gt;&lt;br&gt;static volatile uint8_t can_buf_out_msg0[10]; 
&lt;br&gt;static volatile uint8_t can_buf_out_msg1[10]; 
&lt;br&gt;static volatile uint8_t can_buf_out_msg2[10]; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;funtion called in C code: 
&lt;br&gt;&lt;br&gt;void InitCan(void){ 
&lt;br&gt;&lt;br&gt;/* 
&lt;br&gt;* Msg 0 
&lt;br&gt;*/ 
&lt;br&gt;can_tx_msg0.id = TEST_CAN_TX_MSG0_ID; 
&lt;br&gt;can_tx_msg0.data_ptr = (uint8_t *) can_buf_out_msg0; 
&lt;br&gt;can_tx_msg0.max_size = 8; 
&lt;br&gt;can_tx_msg0.size = 8; 
&lt;br&gt;can_tx_msg0.status = NOT_SENT; 
&lt;br&gt;can_tx_msg0.mob_num = 0; 
&lt;br&gt;can_tx_msg0.mob_assign = FIXED_MOB; 
&lt;br&gt;&lt;br&gt;/* send dummy data... */ 
&lt;br&gt;can_buf_out_msg0[0] = 0; 
&lt;br&gt;can_buf_out_msg0[1] = 0; 
&lt;br&gt;can_buf_out_msg0[2] = 0; 
&lt;br&gt;can_buf_out_msg0[3] = 0; 
&lt;br&gt;can_buf_out_msg0[4] = 0xDE; 
&lt;br&gt;can_buf_out_msg0[5] = 0xAD; 
&lt;br&gt;can_buf_out_msg0[6] = 0xFA; 
&lt;br&gt;can_buf_out_msg0[7] = 0xCE; 
&lt;br&gt;&lt;br&gt;/* 
&lt;br&gt;* Msg 1 
&lt;br&gt;*/ 
&lt;br&gt;can_tx_msg1.id = TEST_CAN_TX_MSG1_ID; 
&lt;br&gt;can_tx_msg1.data_ptr = (uint8_t *) can_buf_out_msg1; 
&lt;br&gt;can_tx_msg1.max_size = 8; 
&lt;br&gt;can_tx_msg1.size = 8; 
&lt;br&gt;can_tx_msg1.status = NOT_SENT; 
&lt;br&gt;can_tx_msg1.mob_assign = FLOATING_MOB; 
&lt;br&gt;&lt;br&gt;/* send dummy data... */ 
&lt;br&gt;can_buf_out_msg1[0] = 0xDE; 
&lt;br&gt;can_buf_out_msg1[1] = 0xAD; 
&lt;br&gt;can_buf_out_msg1[2] = 0xFA; 
&lt;br&gt;can_buf_out_msg1[3] = 0xCE; 
&lt;br&gt;can_buf_out_msg1[4] = 0; 
&lt;br&gt;can_buf_out_msg1[5] = 0; 
&lt;br&gt;can_buf_out_msg1[6] = 0; 
&lt;br&gt;can_buf_out_msg1[7] = 0; 
&lt;br&gt;&lt;br&gt;/* 
&lt;br&gt;* Msg 2 
&lt;br&gt;*/ 
&lt;br&gt;can_tx_msg2.id = TEST_CAN_TX_MSG2_ID; 
&lt;br&gt;can_tx_msg2.data_ptr = (uint8_t *) can_buf_out_msg2; 
&lt;br&gt;can_tx_msg2.max_size = 8; 
&lt;br&gt;can_tx_msg2.size = 8; 
&lt;br&gt;can_tx_msg2.status = NOT_SENT; 
&lt;br&gt;can_tx_msg2.mob_assign = FLOATING_MOB; 
&lt;br&gt;&lt;br&gt;/* send dummy data... */ 
&lt;br&gt;can_buf_out_msg2[0] = 0xDE; 
&lt;br&gt;can_buf_out_msg2[1] = 0xAD; 
&lt;br&gt;can_buf_out_msg2[2] = 0xFA; 
&lt;br&gt;can_buf_out_msg2[3] = 0xCE; 
&lt;br&gt;can_buf_out_msg2[4] = 0; 
&lt;br&gt;can_buf_out_msg2[5] = 0; 
&lt;br&gt;can_buf_out_msg2[6] = 0; 
&lt;br&gt;can_buf_out_msg2[7] = 0; 
&lt;br&gt;&lt;br&gt;......-----------......
&lt;br&gt;&lt;br&gt;the .lss file generated with the error at line 724:
&lt;br&gt;&lt;br&gt;can_tx_msg2.id = TEST_CAN_TX_MSG2_ID; 
&lt;br&gt;71a:	00 ed ldi	r16, 0xD0	; 208 
&lt;br&gt;71c:	e0 2e mov	r14, r16 
&lt;br&gt;71e:	0f ef ldi	r16, 0xFF	; 255 
&lt;br&gt;720:	f0 2e mov	r15, r16 
&lt;br&gt;722:	0f ef ldi	r16, 0xFF	; 255 
&lt;br&gt;724:	00 2f mov	r16, r16 
&lt;br&gt;726:	0d ef ldi	r16, 0xFD	; 253 
&lt;br&gt;728:	10 2f mov	r17, r16 
&lt;br&gt;72a:	e0 92 0f 02 sts	0x020F, r14 
&lt;br&gt;72e:	f0 92 10 02 sts	0x0210, r15 
&lt;br&gt;732:	00 93 11 02 sts	0x0211, r16 
&lt;br&gt;736:	10 93 12 02 sts	0x0212, r17 
&lt;br&gt;can_tx_msg2.data_ptr = (uint8_t *) can_buf_out_msg2; 
&lt;br&gt;73a:	86 e3 ldi	r24, 0x36	; 54 
&lt;br&gt;73c:	92 e0 ldi	r25, 0x02	; 2 
&lt;br&gt;73e:	90 93 18 02 sts	0x0218, r25 
&lt;br&gt;742:	80 93 17 02 sts	0x0217, r24 
&lt;br&gt;can_tx_msg2.max_size = 8; 
&lt;br&gt;746:	60 93 1d 02 sts	0x021D, r22 
&lt;br&gt;can_tx_msg2.size = 8; 
&lt;br&gt;74a:	60 93 1e 02 sts	0x021E, r22 
&lt;br&gt;can_tx_msg2.status = NOT_SENT; 
&lt;br&gt;74e:	70 93 19 02 sts	0x0219, r23
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26573061&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26573061.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26572749</id>
	<title>[bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T02:57:24Z</published>
	<updated>2009-11-30T02:57:24Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Additional Item Attachment, bug #28108 (project avr-libc):
&lt;br&gt;&lt;br&gt;File name: can_bug.zip &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Size:8 KB
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26572749&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26572749.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26572344</id>
	<title>Re: [bug #28108] bug with winavr20090313</title>
	<published>2009-11-30T02:24:22Z</published>
	<updated>2009-11-30T02:24:22Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">Brn wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; URL:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Summary: bug with winavr20090313
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: AVR C Runtime Library
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted by: unknwn
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted on: Fri 27 Nov 2009 06:40:01 PM GMT
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Category: None
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Severity: 3 - Normal
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: 5 - Normal
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item Group: None
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: None
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Percent Complete: 0%
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assigned to: None
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Open/Closed: Open
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Discussion Lock: Any
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Release: 1.6.6
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fixed Release: None
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Details:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; greetings,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm using winavr20090313 which has gcc 4.3.2 and i'm getting the bug that I
&lt;br&gt;&amp;gt; reported at:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=86733&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=86733&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In attachment there's a .rar that shows the error.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Give me a help on this one please.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks ;)
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I can first give you some tips on how to post questions or reports in 
&lt;br&gt;this mailing list, avr freaks, bug trackers, etc. &amp;nbsp;The avr-gcc 
&lt;br&gt;community, both developers and users, are happy to help people - but we 
&lt;br&gt;do expect people to follow certain rules so that we /can/ help you.
&lt;br&gt;&lt;br&gt;First off, use a real name and a real email address. &amp;nbsp;This is a 
&lt;br&gt;community of real people, giving up their real life time to help. &amp;nbsp;We 
&lt;br&gt;expect a certain amount of respect, and using a real name is a minimum. 
&lt;br&gt;&amp;nbsp; You don't get a second chance on this one (from me, anyway - I can't 
&lt;br&gt;speak for any others). &amp;nbsp;I won't give any more help or advice to someone 
&lt;br&gt;who uses an &amp;quot;I'm a cool dude 12 year old&amp;quot; pretend swear word as an email 
&lt;br&gt;address.
&lt;br&gt;&lt;br&gt;Second, we don't want attachments on this list (and the mailing list 
&lt;br&gt;software helpfully strips them). &amp;nbsp;What we like is /small/ snippets of 
&lt;br&gt;code that show the problem. &amp;nbsp;That way we can easily test out the code 
&lt;br&gt;and quickly see if it is a problem with the compiler, or with the user's 
&lt;br&gt;code. &amp;nbsp;Trim your code down to a minimal example that can be easily 
&lt;br&gt;compiled without needing any other files (standard headers like 
&lt;br&gt;&amp;lt;stdint.h&amp;gt; are fine). &amp;nbsp;We also need to know the compiler flags you are 
&lt;br&gt;using - sometimes issues are dependant on the particular options used. 
&lt;br&gt;Once we've got that, it is easy for others to test the code or to 
&lt;br&gt;recognize known issues.
&lt;br&gt;&lt;br&gt;If you do ever need to send attachments, don't use rar format. &amp;nbsp;Use zip 
&lt;br&gt;for windows style, or tgz or tar.bj2 for *nix style.
&lt;br&gt;&lt;br&gt;As others in avrfreaks have said, it looks like your code is triggering 
&lt;br&gt;a known bug in gcc, which appears to have been fixed in the gcc source 
&lt;br&gt;but has not yet made it into a winavr release. &amp;nbsp;If you remove yourself 
&lt;br&gt;from this mailing list, join on again with a real email address, post a 
&lt;br&gt;brief summary of the problem you are having (not just a link to 
&lt;br&gt;avrfreaks) and a code snippet, then we will be able to tell you if there 
&lt;br&gt;is a workaround or other fix that will help you.
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David Brown
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26572344&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26572344.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26562466</id>
	<title>[bug #25723] Realloc corrupts free list when growing into the next free item</title>
	<published>2009-11-29T06:21:27Z</published>
	<updated>2009-11-29T06:21:27Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;Follow-up Comment #7, bug #25723 (project avr-libc):
&lt;br&gt;&lt;br&gt;Hello, I think that there is a miscalculation in the patch which leads to a
&lt;br&gt;severe bug.
&lt;br&gt;&lt;br&gt;In realloc.c:
&lt;br&gt;58: cp = (char *)ptr + len; /* new next pointer */
&lt;br&gt;62: fp2 = (struct __freelist *)(cp - sizeof(size_t));
&lt;br&gt;71: if (len &amp;lt;= fp1-&amp;gt;sz) {
&lt;br&gt;77: &amp;nbsp; fp2-&amp;gt;sz = fp1-&amp;gt;sz - len - sizeof(size_t);
&lt;br&gt;78: &amp;nbsp; fp1-&amp;gt;sz = len;
&lt;br&gt;&lt;br&gt;This leads to fp1 being actually 2 bytes less than the size stored into
&lt;br&gt;fp1-&amp;gt;sz. Also it changes the last two bytes of the allocated memory and this
&lt;br&gt;is how I found it.
&lt;br&gt;&lt;br&gt;Code to reproduce the bug:
&lt;br&gt;int main(void) {
&lt;br&gt;&amp;nbsp; uint8_t *p;
&lt;br&gt;&amp;nbsp; p = malloc(16);
&lt;br&gt;&amp;nbsp; p[8] = 8;
&lt;br&gt;&amp;nbsp; p[9] = 9;
&lt;br&gt;&amp;nbsp; p = realloc(p, 10);
&lt;br&gt;&amp;nbsp; if (p[8] != 8 &amp;&amp; p[9] != 9)
&lt;br&gt;&amp;nbsp; &amp;nbsp; /* memory looks like this:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &amp;nbsp; p - 2: 0A 00
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &amp;nbsp; p &amp;nbsp; &amp;nbsp;: FF FF FF FF
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &amp;nbsp; p + 4: FF FF FF FF
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &amp;nbsp; p + 8: 04 00
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; return 1;
&lt;br&gt;&amp;nbsp; return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Since I'm not very sure how to fix this, could please someone confirm and fix
&lt;br&gt;this. Thanks!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?25723&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?25723&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Nachricht geschickt von/durch Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26562466&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--25723--Realloc-corrupts-free-list-when-growing-into-the-next-free-item-tp22257867p26562466.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26546347</id>
	<title>[bug #28108] bug with winavr20090313</title>
	<published>2009-11-27T10:40:07Z</published>
	<updated>2009-11-27T10:40:07Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;URL:
&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Summary: bug with winavr20090313
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: AVR C Runtime Library
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted by: unknwn
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted on: Fri 27 Nov 2009 06:40:01 PM GMT
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Category: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Severity: 3 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: 5 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item Group: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Percent Complete: 0%
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assigned to: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Open/Closed: Open
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Discussion Lock: Any
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Release: 1.6.6
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fixed Release: None
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Details:
&lt;br&gt;&lt;br&gt;greetings,
&lt;br&gt;&lt;br&gt;I'm using winavr20090313 which has gcc 4.3.2 and i'm getting the bug that I
&lt;br&gt;reported at:
&lt;br&gt;&lt;a href=&quot;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=86733&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=86733&lt;/a&gt;&lt;br&gt;&lt;br&gt;In attachment there's a .rar that shows the error.
&lt;br&gt;&lt;br&gt;Give me a help on this one please.
&lt;br&gt;&lt;br&gt;Thanks ;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;File Attachments:
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------
&lt;br&gt;Date: Fri 27 Nov 2009 06:40:01 PM GMT &amp;nbsp;Name: can_bug.rar &amp;nbsp;Size: 8kB &amp;nbsp; By:
&lt;br&gt;unknwn
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/download.php?file_id=19140&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/download.php?file_id=19140&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28108&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28108&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546347&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28108--bug-with-winavr20090313-tp26546347p26546347.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26498816</id>
	<title>Re: Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-24T08:15:16Z</published>
	<updated>2009-11-24T08:15:16Z</updated>
	<author>
		<name>Wouter van Gulik</name>
	</author>
	<content type="html">David Brown schreef:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Wouter van Gulik wrote:
&lt;br&gt;&amp;gt;&amp;gt; David Brown schreef:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Wouter van Gulik wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; David Brown schreef:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Weddington, Eric wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498816&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009 12:21 AM To:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498816&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re: [avr-libc-dev]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25? 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return ext2() +
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1().
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note, the function return value is present only in expression. So
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is promoted to integer. So it would be better to clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1() only (at one place).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm a little confused by this - I hope this is not implying a 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; return to avr-gcc 4.2 R25 clearing? &amp;nbsp;With avr-gcc 4.2, foo1() above 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; would clear R25 even though it is returning an 8-bit value. &amp;nbsp;This 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; has always been a waste of time and space - caller functions make 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; no use of the cleared R25, and thus clear it again themselves (such 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; as in foo2() after calling ext2()). &amp;nbsp;With avr-gcc 4.3, the extra 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; clear R25 instructions are omitted for functions returning 8-bit 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; values. &amp;nbsp;This is the way it should be (unless the C standards 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; disagree...), IMHO. &amp;nbsp;But it looks a little like you want foo1() to 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; clear R25 here?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Incidentally, avr-gcc 4.2.2 actually produces better code for 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2() than avr-gcc 4.3.2.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; With 4.2.2, the code is:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi R25, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; adiw r24,1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; With 4.3.2 (and 4.3.0), we get:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; mov r18, r24
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi r19, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; subi r18, lo8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; sbci r19, hi8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; movw r24, r18
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Is this regression is news to you, I can take it up in the main 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; avr-gcc mailing list and/or a missed optimisation bug report.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is &amp;quot;normal&amp;quot; GCC behaviour, caused by internal promotion to int 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; types. Having the clr r25 would have saved the ldi r19. Altough 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; these type of missed optimization are known for long, it 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (apparently) is difficult to fix them. IIRC the main problem is the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; carry bit propagation. I still don't now why exactly that is such a 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; big problem, but then again I am no gcc expert.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I understand about int promotion, and how it's a PITA to remove all 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the extra code that the avr backend has to put in because the gcc 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; frontend has promoted the 8-bit data to 16-bit ints. &amp;nbsp;However, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; avr-gcc 4.2 /does/ do a clr R25 in the function returning an 8-bit 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; result, and then it clears it /again/ after calling it (as in foo2 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; above). &amp;nbsp;That is definitely a waste, and it has been removed in 4.3+.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The problem I have with the 4.3.2 code above is not the zeroing of 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the upper byte - that's standard int promotion, and is required for 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; correct code. &amp;nbsp;The problem is that the result of ext2() is first 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; moved into a new register pair and then promoted to an int - an 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; unnecessary move, which forces the subi/sbci pair instead of subw, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and requires an additional move before the ret instruction. &amp;nbsp;In more 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; complex code, the wasted register resources may also be relevant.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; You're right, I was not grasping the real problem. However using 
&lt;br&gt;&amp;gt;&amp;gt; -fno-split-wide-types makes 4.3.2 behave like 4.2.2. Split wide types 
&lt;br&gt;&amp;gt;&amp;gt; seems to be the problem here.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You are correct - I hadn't thought of that. &amp;nbsp;However, 
&lt;br&gt;&amp;gt; -fno-split-wide-types is a workaround, rather than a solution. &amp;nbsp;Ideally, 
&lt;br&gt;&amp;gt; the good code should be produced regardless of that flag, since 
&lt;br&gt;&amp;gt; split-wide-types is enabled implicitly by all -Ox flags. &amp;nbsp;The 
&lt;br&gt;&amp;gt; split-wide-types is also useful to improve some code sequences, such as 
&lt;br&gt;&amp;gt; when you have 32-bit data but only want to look at part of it.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Yes of course it is a workaround, it might be a hint on where the 
&lt;br&gt;problem is. I did some simple experiments and it seems that split wide 
&lt;br&gt;type only enforces a copy to a new register pair, which makes it less 
&lt;br&gt;efficient.
&lt;br&gt;&lt;br&gt;HTH,
&lt;br&gt;&lt;br&gt;Wouter
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26498816&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26498816.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26497666</id>
	<title>Re: Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-24T06:41:50Z</published>
	<updated>2009-11-24T06:41:50Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">Wouter van Gulik wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; David Brown schreef:
&lt;br&gt;&amp;gt;&amp;gt; Wouter van Gulik wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; David Brown schreef:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Weddington, Eric wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26497666&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009 12:21 AM To:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26497666&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re: [avr-libc-dev]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25? 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return ext2() +
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1().
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note, the function return value is present only in expression. So
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is promoted to integer. So it would be better to clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1() only (at one place).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm a little confused by this - I hope this is not implying a return 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to avr-gcc 4.2 R25 clearing? &amp;nbsp;With avr-gcc 4.2, foo1() above would 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; clear R25 even though it is returning an 8-bit value. &amp;nbsp;This has 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; always been a waste of time and space - caller functions make no use 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; of the cleared R25, and thus clear it again themselves (such as in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2() after calling ext2()). &amp;nbsp;With avr-gcc 4.3, the extra clear R25 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; instructions are omitted for functions returning 8-bit values. &amp;nbsp;This 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is the way it should be (unless the C standards disagree...), IMHO. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; But it looks a little like you want foo1() to clear R25 here?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Incidentally, avr-gcc 4.2.2 actually produces better code for foo2() 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; than avr-gcc 4.3.2.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; With 4.2.2, the code is:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi R25, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; adiw r24,1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; With 4.3.2 (and 4.3.0), we get:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; mov r18, r24
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi r19, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; subi r18, lo8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; sbci r19, hi8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; movw r24, r18
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Is this regression is news to you, I can take it up in the main 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; avr-gcc mailing list and/or a missed optimisation bug report.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; This is &amp;quot;normal&amp;quot; GCC behaviour, caused by internal promotion to int 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; types. Having the clr r25 would have saved the ldi r19. Altough these 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; type of missed optimization are known for long, it (apparently) is 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; difficult to fix them. IIRC the main problem is the carry bit 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; propagation. I still don't now why exactly that is such a big 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; problem, but then again I am no gcc expert.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I understand about int promotion, and how it's a PITA to remove all 
&lt;br&gt;&amp;gt;&amp;gt; the extra code that the avr backend has to put in because the gcc 
&lt;br&gt;&amp;gt;&amp;gt; frontend has promoted the 8-bit data to 16-bit ints. &amp;nbsp;However, avr-gcc 
&lt;br&gt;&amp;gt;&amp;gt; 4.2 /does/ do a clr R25 in the function returning an 8-bit result, and 
&lt;br&gt;&amp;gt;&amp;gt; then it clears it /again/ after calling it (as in foo2 above). &amp;nbsp;That 
&lt;br&gt;&amp;gt;&amp;gt; is definitely a waste, and it has been removed in 4.3+.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The problem I have with the 4.3.2 code above is not the zeroing of the 
&lt;br&gt;&amp;gt;&amp;gt; upper byte - that's standard int promotion, and is required for 
&lt;br&gt;&amp;gt;&amp;gt; correct code. &amp;nbsp;The problem is that the result of ext2() is first moved 
&lt;br&gt;&amp;gt;&amp;gt; into a new register pair and then promoted to an int - an unnecessary 
&lt;br&gt;&amp;gt;&amp;gt; move, which forces the subi/sbci pair instead of subw, and requires an 
&lt;br&gt;&amp;gt;&amp;gt; additional move before the ret instruction. &amp;nbsp;In more complex code, the 
&lt;br&gt;&amp;gt;&amp;gt; wasted register resources may also be relevant.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You're right, I was not grasping the real problem. However using 
&lt;br&gt;&amp;gt; -fno-split-wide-types makes 4.3.2 behave like 4.2.2. Split wide types 
&lt;br&gt;&amp;gt; seems to be the problem here.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;You are correct - I hadn't thought of that. &amp;nbsp;However, 
&lt;br&gt;-fno-split-wide-types is a workaround, rather than a solution. &amp;nbsp;Ideally, 
&lt;br&gt;the good code should be produced regardless of that flag, since 
&lt;br&gt;split-wide-types is enabled implicitly by all -Ox flags. &amp;nbsp;The 
&lt;br&gt;split-wide-types is also useful to improve some code sequences, such as 
&lt;br&gt;when you have 32-bit data but only want to look at part of it.
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26497666&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26497666.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26494658</id>
	<title>Re: Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-24T03:55:01Z</published>
	<updated>2009-11-24T03:55:01Z</updated>
	<author>
		<name>Wouter van Gulik</name>
	</author>
	<content type="html">David Brown schreef:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Wouter van Gulik wrote:
&lt;br&gt;&amp;gt;&amp;gt; David Brown schreef:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Weddington, Eric wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26494658&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009 12:21 AM To:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26494658&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re: [avr-libc-dev]
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25? 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return ext2() +
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1().
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note, the function return value is present only in expression. So
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is promoted to integer. So it would be better to clear R25 in
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; foo1() only (at one place).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm a little confused by this - I hope this is not implying a return 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to avr-gcc 4.2 R25 clearing? &amp;nbsp;With avr-gcc 4.2, foo1() above would 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; clear R25 even though it is returning an 8-bit value. &amp;nbsp;This has 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; always been a waste of time and space - caller functions make no use 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; of the cleared R25, and thus clear it again themselves (such as in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; foo2() after calling ext2()). &amp;nbsp;With avr-gcc 4.3, the extra clear R25 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; instructions are omitted for functions returning 8-bit values. &amp;nbsp;This 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; is the way it should be (unless the C standards disagree...), IMHO. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; But it looks a little like you want foo1() to clear R25 here?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Incidentally, avr-gcc 4.2.2 actually produces better code for foo2() 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; than avr-gcc 4.3.2.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; With 4.2.2, the code is:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi R25, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; adiw r24,1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; With 4.3.2 (and 4.3.0), we get:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; foo2:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; mov r18, r24
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ldi r19, lo8(0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; subi r18, lo8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; sbci r19, hi8(-(1))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; movw r24, r18
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is this regression is news to you, I can take it up in the main 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; avr-gcc mailing list and/or a missed optimisation bug report.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This is &amp;quot;normal&amp;quot; GCC behaviour, caused by internal promotion to int 
&lt;br&gt;&amp;gt;&amp;gt; types. Having the clr r25 would have saved the ldi r19. Altough these 
&lt;br&gt;&amp;gt;&amp;gt; type of missed optimization are known for long, it (apparently) is 
&lt;br&gt;&amp;gt;&amp;gt; difficult to fix them. IIRC the main problem is the carry bit 
&lt;br&gt;&amp;gt;&amp;gt; propagation. I still don't now why exactly that is such a big problem, 
&lt;br&gt;&amp;gt;&amp;gt; but then again I am no gcc expert.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I understand about int promotion, and how it's a PITA to remove all the 
&lt;br&gt;&amp;gt; extra code that the avr backend has to put in because the gcc frontend 
&lt;br&gt;&amp;gt; has promoted the 8-bit data to 16-bit ints. &amp;nbsp;However, avr-gcc 4.2 /does/ 
&lt;br&gt;&amp;gt; do a clr R25 in the function returning an 8-bit result, and then it 
&lt;br&gt;&amp;gt; clears it /again/ after calling it (as in foo2 above). &amp;nbsp;That is 
&lt;br&gt;&amp;gt; definitely a waste, and it has been removed in 4.3+.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The problem I have with the 4.3.2 code above is not the zeroing of the 
&lt;br&gt;&amp;gt; upper byte - that's standard int promotion, and is required for correct 
&lt;br&gt;&amp;gt; code. &amp;nbsp;The problem is that the result of ext2() is first moved into a 
&lt;br&gt;&amp;gt; new register pair and then promoted to an int - an unnecessary move, 
&lt;br&gt;&amp;gt; which forces the subi/sbci pair instead of subw, and requires an 
&lt;br&gt;&amp;gt; additional move before the ret instruction. &amp;nbsp;In more complex code, the 
&lt;br&gt;&amp;gt; wasted register resources may also be relevant.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;You're right, I was not grasping the real problem. However using 
&lt;br&gt;-fno-split-wide-types makes 4.3.2 behave like 4.2.2. Split wide types 
&lt;br&gt;seems to be the problem here.
&lt;br&gt;&lt;br&gt;HTH
&lt;br&gt;&lt;br&gt;Wouter
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26494658&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26494658.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487160</id>
	<title>Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-23T14:25:13Z</published>
	<updated>2009-11-23T14:25:13Z</updated>
	<author>
		<name>David Brown-40</name>
	</author>
	<content type="html">Weddington, Eric wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487160&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt;&amp;gt; On Behalf Of David Brown Sent: Monday, November 23, 2009 3:25 AM 
&lt;br&gt;&amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487160&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: [avr-libc-dev] Re:
&lt;br&gt;&amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Weddington, Eric wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487160&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; org] On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 12:21 AM To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487160&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [avr-libc-dev] eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ext2() + 1; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in foo1().
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Note, the function return value is present only in expression.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; So it is promoted to integer. So it would be better to clear
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R25 in foo1() only (at one place).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I'm a little confused by this - I hope this is not implying a 
&lt;br&gt;&amp;gt;&amp;gt; return to avr-gcc 4.2 R25 clearing?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; No, that wasn't my intention. I was merely commenting that the return
&lt;br&gt;&amp;gt; type of the macro/function should not be made int (16-bit), that it
&lt;br&gt;&amp;gt; should be a byte (uint8_t) as the API name implicates. If it is
&lt;br&gt;&amp;gt; returned as a byte, then yes it is implied and I agree that R25
&lt;br&gt;&amp;gt; should not be cleared.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Ah, good - as I hoped. &amp;nbsp;I just wanted to be sure.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Is this regression is news to you, I can take it up in the main
&lt;br&gt;&amp;gt;&amp;gt; avr-gcc mailing list and/or a missed optimisation bug report.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please fill out a bug report. That way it won't get lost.
&lt;br&gt;&lt;br&gt;I've added it to the WinAVR bug tracker:
&lt;br&gt;&amp;lt;&lt;a href=&quot;https://sourceforge.net/tracker/?func=detail&amp;aid=2902772&amp;group_id=68108&amp;atid=520074&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://sourceforge.net/tracker/?func=detail&amp;aid=2902772&amp;group_id=68108&amp;atid=520074&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Hope that helps!
&lt;br&gt;&lt;br&gt;p.s. - I'm looking forward to gcc 4.5 with LTO. &amp;nbsp;For small targets like 
&lt;br&gt;the AVR, that should mean full program optimisation for everything, 
&lt;br&gt;including the libraries.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26487160&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26487160.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26481275</id>
	<title>RE: Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-23T08:17:00Z</published>
	<updated>2009-11-23T08:17:00Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481275&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of David Brown
&lt;br&gt;&amp;gt; Sent: Monday, November 23, 2009 3:25 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481275&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: [avr-libc-dev] Re: eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Weddington, Eric wrote:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481275&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009 12:21 AM To:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481275&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re: [avr-libc-dev]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25? 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return ext2() +
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 1; }
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25 in
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; foo1().
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Note, the function return value is present only in expression. So
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; it is promoted to integer. So it would be better to clear R25 in
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; foo1() only (at one place).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm a little confused by this - I hope this is not implying a 
&lt;br&gt;&amp;gt; return to 
&lt;br&gt;&amp;gt; avr-gcc 4.2 R25 clearing?
&lt;/div&gt;&lt;br&gt;No, that wasn't my intention. I was merely commenting that the return type of the macro/function should not be made int (16-bit), that it should be a byte (uint8_t) as the API name implicates. If it is returned as a byte, then yes it is implied and I agree that R25 should not be cleared.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; Is this regression is news to you, I can take it up in the 
&lt;br&gt;&amp;gt; main avr-gcc 
&lt;br&gt;&amp;gt; mailing list and/or a missed optimisation bug report.
&lt;br&gt;&lt;br&gt;Please fill out a bug report. That way it won't get lost.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26481275&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26481275.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26475688</id>
	<title>Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-23T02:24:38Z</published>
	<updated>2009-11-23T02:24:38Z</updated>
	<author>
		<name>David Brown-4</name>
	</author>
	<content type="html">Weddington, Eric wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message----- From: 
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26475688&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu. org]
&lt;br&gt;&amp;gt;&amp;gt; On Behalf Of Dmitry K. Sent: Sunday, November 22, 2009 12:21 AM To:
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26475688&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt; Subject: Re: [avr-libc-dev]
&lt;br&gt;&amp;gt;&amp;gt; eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25? 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; eerd_byte.S: clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function
&lt;br&gt;&amp;gt;&amp;gt; returning a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;&amp;gt; This is a misty point. Look an example:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; unsigned char foo1 (unsigned char *p) { return *p; }
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; extern unsigned char ext2 (void); int foo2 (void) { return ext2() +
&lt;br&gt;&amp;gt;&amp;gt; 1; }
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1() and
&lt;br&gt;&amp;gt;&amp;gt; foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not clear R25 in
&lt;br&gt;&amp;gt;&amp;gt; foo1().
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Note, the function return value is present only in expression. So
&lt;br&gt;&amp;gt;&amp;gt; it is promoted to integer. So it would be better to clear R25 in
&lt;br&gt;&amp;gt;&amp;gt; foo1() only (at one place).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I agree that that is the way it should be.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I'm a little confused by this - I hope this is not implying a return to 
&lt;br&gt;avr-gcc 4.2 R25 clearing? &amp;nbsp;With avr-gcc 4.2, foo1() above would clear 
&lt;br&gt;R25 even though it is returning an 8-bit value. &amp;nbsp;This has always been a 
&lt;br&gt;waste of time and space - caller functions make no use of the cleared 
&lt;br&gt;R25, and thus clear it again themselves (such as in foo2() after calling 
&lt;br&gt;ext2()). &amp;nbsp;With avr-gcc 4.3, the extra clear R25 instructions are omitted 
&lt;br&gt;for functions returning 8-bit values. &amp;nbsp;This is the way it should be 
&lt;br&gt;(unless the C standards disagree...), IMHO. &amp;nbsp;But it looks a little like 
&lt;br&gt;you want foo1() to clear R25 here?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Incidentally, avr-gcc 4.2.2 actually produces better code for foo2() 
&lt;br&gt;than avr-gcc 4.3.2.
&lt;br&gt;&lt;br&gt;With 4.2.2, the code is:
&lt;br&gt;foo2:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ldi R25, lo8(0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adiw r24,1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&lt;br&gt;With 4.3.2 (and 4.3.0), we get:
&lt;br&gt;foo2:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call ext2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mov r18, r24
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ldi r19, lo8(0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subi r18, lo8(-(1))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbci r19, hi8(-(1))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; movw r24, r18
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ret
&lt;br&gt;&lt;br&gt;Is this regression is news to you, I can take it up in the main avr-gcc 
&lt;br&gt;mailing list and/or a missed optimisation bug report.
&lt;br&gt;&lt;br&gt;mvh.,
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Possibly, it is needed to change eeprom_read_byte() definition to
&lt;br&gt;&amp;gt;&amp;gt; int return value. This can reduce summary size. Opinions?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This does not make sense to me. Eeprom_read_byte() is supposed to
&lt;br&gt;&amp;gt; read, and return, a single byte. So why should it return a 16-bit
&lt;br&gt;&amp;gt; int? In my mind this would just make it more confusing to the end
&lt;br&gt;&amp;gt; user.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26475688&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26475688.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26470398</id>
	<title>Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-22T14:45:04Z</published>
	<updated>2009-11-22T14:45:04Z</updated>
	<author>
		<name>Dmitry K.</name>
	</author>
	<content type="html">&amp;gt; &amp;gt; Possibly, it is needed to change eeprom_read_byte() definition
&lt;br&gt;&amp;gt; &amp;gt; to int return value. This can reduce summary size. Opinions?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This does not make sense to me. Eeprom_read_byte() is supposed to read, and
&lt;br&gt;&amp;gt; return, a single byte. So why should it return a 16-bit int? In my mind
&lt;br&gt;&amp;gt; this would just make it more confusing to the end user.
&lt;br&gt;&lt;br&gt;Agree, it was a bad idea.
&lt;br&gt;More, the definition of eeprom_read_byte() as int will
&lt;br&gt;decrease performance in cases, where Avr-gcc can omit
&lt;br&gt;integral promotion, for example:
&lt;br&gt;&amp;nbsp; if (eeprom_read_byte(&amp;x) &amp;lt; 10)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Dmitry.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26470398&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26470398.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26467394</id>
	<title>Re: stdint.h problem with gcc</title>
	<published>2009-11-22T09:33:02Z</published>
	<updated>2009-11-22T09:33:02Z</updated>
	<author>
		<name>Andrew Hutchinson</name>
	</author>
	<content type="html">I have posted patch to &amp;quot;ignore&amp;quot; gcc stdint test failure due to limit 
&lt;br&gt;range of prtdiff &amp;nbsp;for AVR (c99 wants +-65535)
&lt;br&gt;Though we could use &amp;quot;long&amp;quot; that is pointless with restriction on objects 
&lt;br&gt;being &amp;nbsp;&amp;lt;= 32767 bytes.
&lt;br&gt;&lt;br&gt;There are several errors/problems remaining with avr-libc stdint.h - gcc 
&lt;br&gt;version passes most (all?) tests.
&lt;br&gt;I would be grateful if someone could review this.
&lt;br&gt;&lt;br&gt;Andy
&lt;br&gt;&lt;br&gt;&lt;br&gt;Andrew Hutchinson wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have been going through the gcc tests for V4.5 and come across some 
&lt;br&gt;&amp;gt; issues with avr-lic stdint.h
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The tests that fails are gcc/gcc/testsuite/gcc.dg/c99-stdint-1.c
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; gcc will create it's own stdint.h and this is fine for V4.5. I have 
&lt;br&gt;&amp;gt; attached this for reference.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The definition of UINT8_MAX is unsigned e.g. 255U - this fails test. 
&lt;br&gt;&amp;gt; 255 is ok
&lt;br&gt;&amp;gt; wchar limits are not defined- ok we dont have wchar.h but we should 
&lt;br&gt;&amp;gt; still define the types.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There is &amp;nbsp;another issue related to ptrdiff type. This is posted as gcc 
&lt;br&gt;&amp;gt; bug - since it is possible that this particular subtest is 
&lt;br&gt;&amp;gt; inappropriate for avr.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42114&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42114&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; =================================================================
&lt;br&gt;&amp;gt; /* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This file is part of GCC.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; GCC is free software; you can redistribute it and/or modify
&lt;br&gt;&amp;gt; it under the terms of the GNU General Public License as published by
&lt;br&gt;&amp;gt; the Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;&amp;gt; any later version.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; GCC is distributed in the hope that it will be useful,
&lt;br&gt;&amp;gt; but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;&amp;gt; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;&amp;gt; GNU General Public License for more details.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Under Section 7 of GPL version 3, you are granted additional
&lt;br&gt;&amp;gt; permissions described in the GCC Runtime Library Exception, version
&lt;br&gt;&amp;gt; 3.1, as published by the Free Software Foundation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You should have received a copy of the GNU General Public License and
&lt;br&gt;&amp;gt; a copy of the GCC Runtime Library Exception along with this program;
&lt;br&gt;&amp;gt; see the files COPYING3 and COPYING.RUNTIME respectively. &amp;nbsp;If not, see
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;. &amp;nbsp;*/
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /*
&lt;br&gt;&amp;gt; * ISO C Standard: &amp;nbsp;7.18 &amp;nbsp;Integer types &amp;nbsp;&amp;lt;stdint.h&amp;gt;
&lt;br&gt;&amp;gt; */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #ifndef _GCC_STDINT_H
&lt;br&gt;&amp;gt; #define _GCC_STDINT_H
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.8.1.1 Exact-width integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #ifdef __INT8_TYPE__
&lt;br&gt;&amp;gt; typedef __INT8_TYPE__ int8_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT16_TYPE__
&lt;br&gt;&amp;gt; typedef __INT16_TYPE__ int16_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT32_TYPE__
&lt;br&gt;&amp;gt; typedef __INT32_TYPE__ int32_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT64_TYPE__
&lt;br&gt;&amp;gt; typedef __INT64_TYPE__ int64_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT8_TYPE__
&lt;br&gt;&amp;gt; typedef __UINT8_TYPE__ uint8_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT16_TYPE__
&lt;br&gt;&amp;gt; typedef __UINT16_TYPE__ uint16_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT32_TYPE__
&lt;br&gt;&amp;gt; typedef __UINT32_TYPE__ uint32_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT64_TYPE__
&lt;br&gt;&amp;gt; typedef __UINT64_TYPE__ uint64_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.8.1.2 Minimum-width integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; typedef __INT_LEAST8_TYPE__ int_least8_t;
&lt;br&gt;&amp;gt; typedef __INT_LEAST16_TYPE__ int_least16_t;
&lt;br&gt;&amp;gt; typedef __INT_LEAST32_TYPE__ int_least32_t;
&lt;br&gt;&amp;gt; typedef __INT_LEAST64_TYPE__ int_least64_t;
&lt;br&gt;&amp;gt; typedef __UINT_LEAST8_TYPE__ uint_least8_t;
&lt;br&gt;&amp;gt; typedef __UINT_LEAST16_TYPE__ uint_least16_t;
&lt;br&gt;&amp;gt; typedef __UINT_LEAST32_TYPE__ uint_least32_t;
&lt;br&gt;&amp;gt; typedef __UINT_LEAST64_TYPE__ uint_least64_t;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.8.1.3 Fastest minimum-width integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; typedef __INT_FAST8_TYPE__ int_fast8_t;
&lt;br&gt;&amp;gt; typedef __INT_FAST16_TYPE__ int_fast16_t;
&lt;br&gt;&amp;gt; typedef __INT_FAST32_TYPE__ int_fast32_t;
&lt;br&gt;&amp;gt; typedef __INT_FAST64_TYPE__ int_fast64_t;
&lt;br&gt;&amp;gt; typedef __UINT_FAST8_TYPE__ uint_fast8_t;
&lt;br&gt;&amp;gt; typedef __UINT_FAST16_TYPE__ uint_fast16_t;
&lt;br&gt;&amp;gt; typedef __UINT_FAST32_TYPE__ uint_fast32_t;
&lt;br&gt;&amp;gt; typedef __UINT_FAST64_TYPE__ uint_fast64_t;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.8.1.4 Integer types capable of holding object pointers */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #ifdef __INTPTR_TYPE__
&lt;br&gt;&amp;gt; typedef __INTPTR_TYPE__ intptr_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINTPTR_TYPE__
&lt;br&gt;&amp;gt; typedef __UINTPTR_TYPE__ uintptr_t;
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.8.1.5 Greatest-width integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; typedef __INTMAX_TYPE__ intmax_t;
&lt;br&gt;&amp;gt; typedef __UINTMAX_TYPE__ uintmax_t;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #if !defined __cplusplus || defined __STDC_LIMIT_MACROS
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.18.2 Limits of specified-width integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #ifdef __INT8_MAX__
&lt;br&gt;&amp;gt; # undef INT8_MAX
&lt;br&gt;&amp;gt; # define INT8_MAX __INT8_MAX__
&lt;br&gt;&amp;gt; # undef INT8_MIN
&lt;br&gt;&amp;gt; # define INT8_MIN (-INT8_MAX - 1)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT8_MAX__
&lt;br&gt;&amp;gt; # undef UINT8_MAX
&lt;br&gt;&amp;gt; # define UINT8_MAX __UINT8_MAX__
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT16_MAX__
&lt;br&gt;&amp;gt; # undef INT16_MAX
&lt;br&gt;&amp;gt; # define INT16_MAX __INT16_MAX__
&lt;br&gt;&amp;gt; # undef INT16_MIN
&lt;br&gt;&amp;gt; # define INT16_MIN (-INT16_MAX - 1)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT16_MAX__
&lt;br&gt;&amp;gt; # undef UINT16_MAX
&lt;br&gt;&amp;gt; # define UINT16_MAX __UINT16_MAX__
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT32_MAX__
&lt;br&gt;&amp;gt; # undef INT32_MAX
&lt;br&gt;&amp;gt; # define INT32_MAX __INT32_MAX__
&lt;br&gt;&amp;gt; # undef INT32_MIN
&lt;br&gt;&amp;gt; # define INT32_MIN (-INT32_MAX - 1)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT32_MAX__
&lt;br&gt;&amp;gt; # undef UINT32_MAX
&lt;br&gt;&amp;gt; # define UINT32_MAX __UINT32_MAX__
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __INT64_MAX__
&lt;br&gt;&amp;gt; # undef INT64_MAX
&lt;br&gt;&amp;gt; # define INT64_MAX __INT64_MAX__
&lt;br&gt;&amp;gt; # undef INT64_MIN
&lt;br&gt;&amp;gt; # define INT64_MIN (-INT64_MAX - 1)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINT64_MAX__
&lt;br&gt;&amp;gt; # undef UINT64_MAX
&lt;br&gt;&amp;gt; # define UINT64_MAX __UINT64_MAX__
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef INT_LEAST8_MAX
&lt;br&gt;&amp;gt; #define INT_LEAST8_MAX __INT_LEAST8_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST8_MIN
&lt;br&gt;&amp;gt; #define INT_LEAST8_MIN (-INT_LEAST8_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_LEAST8_MAX
&lt;br&gt;&amp;gt; #define UINT_LEAST8_MAX __UINT_LEAST8_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST16_MAX
&lt;br&gt;&amp;gt; #define INT_LEAST16_MAX __INT_LEAST16_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST16_MIN
&lt;br&gt;&amp;gt; #define INT_LEAST16_MIN (-INT_LEAST16_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_LEAST16_MAX
&lt;br&gt;&amp;gt; #define UINT_LEAST16_MAX __UINT_LEAST16_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST32_MAX
&lt;br&gt;&amp;gt; #define INT_LEAST32_MAX __INT_LEAST32_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST32_MIN
&lt;br&gt;&amp;gt; #define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_LEAST32_MAX
&lt;br&gt;&amp;gt; #define UINT_LEAST32_MAX __UINT_LEAST32_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST64_MAX
&lt;br&gt;&amp;gt; #define INT_LEAST64_MAX __INT_LEAST64_MAX__
&lt;br&gt;&amp;gt; #undef INT_LEAST64_MIN
&lt;br&gt;&amp;gt; #define INT_LEAST64_MIN (-INT_LEAST64_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_LEAST64_MAX
&lt;br&gt;&amp;gt; #define UINT_LEAST64_MAX __UINT_LEAST64_MAX__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef INT_FAST8_MAX
&lt;br&gt;&amp;gt; #define INT_FAST8_MAX __INT_FAST8_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST8_MIN
&lt;br&gt;&amp;gt; #define INT_FAST8_MIN (-INT_FAST8_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_FAST8_MAX
&lt;br&gt;&amp;gt; #define UINT_FAST8_MAX __UINT_FAST8_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST16_MAX
&lt;br&gt;&amp;gt; #define INT_FAST16_MAX __INT_FAST16_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST16_MIN
&lt;br&gt;&amp;gt; #define INT_FAST16_MIN (-INT_FAST16_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_FAST16_MAX
&lt;br&gt;&amp;gt; #define UINT_FAST16_MAX __UINT_FAST16_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST32_MAX
&lt;br&gt;&amp;gt; #define INT_FAST32_MAX __INT_FAST32_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST32_MIN
&lt;br&gt;&amp;gt; #define INT_FAST32_MIN (-INT_FAST32_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_FAST32_MAX
&lt;br&gt;&amp;gt; #define UINT_FAST32_MAX __UINT_FAST32_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST64_MAX
&lt;br&gt;&amp;gt; #define INT_FAST64_MAX __INT_FAST64_MAX__
&lt;br&gt;&amp;gt; #undef INT_FAST64_MIN
&lt;br&gt;&amp;gt; #define INT_FAST64_MIN (-INT_FAST64_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINT_FAST64_MAX
&lt;br&gt;&amp;gt; #define UINT_FAST64_MAX __UINT_FAST64_MAX__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #ifdef __INTPTR_MAX__
&lt;br&gt;&amp;gt; # undef INTPTR_MAX
&lt;br&gt;&amp;gt; # define INTPTR_MAX __INTPTR_MAX__
&lt;br&gt;&amp;gt; # undef INTPTR_MIN
&lt;br&gt;&amp;gt; # define INTPTR_MIN (-INTPTR_MAX - 1)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt; #ifdef __UINTPTR_MAX__
&lt;br&gt;&amp;gt; # undef UINTPTR_MAX
&lt;br&gt;&amp;gt; # define UINTPTR_MAX __UINTPTR_MAX__
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef INTMAX_MAX
&lt;br&gt;&amp;gt; #define INTMAX_MAX __INTMAX_MAX__
&lt;br&gt;&amp;gt; #undef INTMAX_MIN
&lt;br&gt;&amp;gt; #define INTMAX_MIN (-INTMAX_MAX - 1)
&lt;br&gt;&amp;gt; #undef UINTMAX_MAX
&lt;br&gt;&amp;gt; #define UINTMAX_MAX __UINTMAX_MAX__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /* 7.18.3 Limits of other integer types */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef PTRDIFF_MAX
&lt;br&gt;&amp;gt; #define PTRDIFF_MAX __PTRDIFF_MAX__
&lt;br&gt;&amp;gt; #undef PTRDIFF_MIN
&lt;br&gt;&amp;gt; #define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef SIG_ATOMIC_MAX
&lt;br&gt;&amp;gt; #define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__
&lt;br&gt;&amp;gt; #undef SIG_ATOMIC_MIN
&lt;br&gt;&amp;gt; #define SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef SIZE_MAX
&lt;br&gt;&amp;gt; #define SIZE_MAX __SIZE_MAX__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef WCHAR_MAX
&lt;br&gt;&amp;gt; #define WCHAR_MAX __WCHAR_MAX__
&lt;br&gt;&amp;gt; #undef WCHAR_MIN
&lt;br&gt;&amp;gt; #define WCHAR_MIN __WCHAR_MIN__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef WINT_MAX
&lt;br&gt;&amp;gt; #define WINT_MAX __WINT_MAX__
&lt;br&gt;&amp;gt; #undef WINT_MIN
&lt;br&gt;&amp;gt; #define WINT_MIN __WINT_MIN__
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #undef INT8_C
&lt;br&gt;&amp;gt; #define INT8_C(c) __INT8_C(c)
&lt;br&gt;&amp;gt; #undef INT16_C
&lt;br&gt;&amp;gt; #define INT16_C(c) __INT16_C(c)
&lt;br&gt;&amp;gt; #undef INT32_C
&lt;br&gt;&amp;gt; #define INT32_C(c) __INT32_C(c)
&lt;br&gt;&amp;gt; #undef INT64_C
&lt;br&gt;&amp;gt; #define INT64_C(c) __INT64_C(c)
&lt;br&gt;&amp;gt; #undef UINT8_C
&lt;br&gt;&amp;gt; #define UINT8_C(c) __UINT8_C(c)
&lt;br&gt;&amp;gt; #undef UINT16_C
&lt;br&gt;&amp;gt; #define UINT16_C(c) __UINT16_C(c)
&lt;br&gt;&amp;gt; #undef UINT32_C
&lt;br&gt;&amp;gt; #define UINT32_C(c) __UINT32_C(c)
&lt;br&gt;&amp;gt; #undef UINT64_C
&lt;br&gt;&amp;gt; #define UINT64_C(c) __UINT64_C(c)
&lt;br&gt;&amp;gt; #undef INTMAX_C
&lt;br&gt;&amp;gt; #define INTMAX_C(c) __INTMAX_C(c)
&lt;br&gt;&amp;gt; #undef UINTMAX_C
&lt;br&gt;&amp;gt; #define UINTMAX_C(c) __UINTMAX_C(c)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #endif /* _GCC_STDINT_H */
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26467394&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/stdint.h-problem-with-gcc-tp26437418p26467394.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26465271</id>
	<title>RE: Float equivalents to double functions</title>
	<published>2009-11-22T05:21:16Z</published>
	<updated>2009-11-22T05:21:16Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465271&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Dmitry K.
&lt;br&gt;&amp;gt; Sent: Sunday, November 22, 2009 12:23 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465271&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-libc-dev] Float equivalents to double functions
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sunday 22 November 2009 12:32, Andrew Hutchinson wrote:
&lt;br&gt;&amp;gt; &amp;gt; Could someone add float variations of common functions to avr libc -
&lt;br&gt;&amp;gt; &amp;gt; this would match gcc expectations for available libc functions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Good observation.
&lt;br&gt;&amp;gt; If no objections, I will do this.
&lt;/div&gt;&lt;br&gt;No objections with me. Sounds like a good idea.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465271&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Float-equivalents-to-double-functions-tp26462385p26465271.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26465280</id>
	<title>RE: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-22T05:20:49Z</published>
	<updated>2009-11-22T05:20:49Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465280&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Dmitry K.
&lt;br&gt;&amp;gt; Sent: Sunday, November 22, 2009 12:21 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465280&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-libc-dev] eeprom_read_byte and clr ret_hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; eerd_byte.S:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Does the AVR ABI require that r25 be zeroed in a function 
&lt;br&gt;&amp;gt; returning a
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is a misty point.
&lt;br&gt;&amp;gt; Look an example:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; unsigned char foo1 (unsigned char *p)
&lt;br&gt;&amp;gt; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; return *p;
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; extern unsigned char ext2 (void);
&lt;br&gt;&amp;gt; &amp;nbsp; int foo2 (void)
&lt;br&gt;&amp;gt; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; return ext2() + 1;
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1()
&lt;br&gt;&amp;gt; and foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not
&lt;br&gt;&amp;gt; clear R25 in foo1().
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Note, the function return value is present only in expression.
&lt;br&gt;&amp;gt; So it is promoted to integer. So it would be better to clear
&lt;br&gt;&amp;gt; R25 in foo1() only (at one place).
&lt;/div&gt;&lt;br&gt;I agree that that is the way it should be.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; Possibly, it is needed to change eeprom_read_byte() definition
&lt;br&gt;&amp;gt; to int return value. This can reduce summary size. Opinions?
&lt;br&gt;&lt;br&gt;This does not make sense to me. Eeprom_read_byte() is supposed to read, and return, a single byte. So why should it return a 16-bit int? In my mind this would just make it more confusing to the end user.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26465280&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26465280.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26463284</id>
	<title>Re: Float equivalents to double functions</title>
	<published>2009-11-21T23:22:28Z</published>
	<updated>2009-11-21T23:22:28Z</updated>
	<author>
		<name>Dmitry K.</name>
	</author>
	<content type="html">On Sunday 22 November 2009 12:32, Andrew Hutchinson wrote:
&lt;br&gt;&amp;gt; Could someone add float variations of common functions to avr libc -
&lt;br&gt;&amp;gt; this would match gcc expectations for available libc functions.
&lt;br&gt;&lt;br&gt;Good observation.
&lt;br&gt;If no objections, I will do this.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Dmitry.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26463284&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Float-equivalents-to-double-functions-tp26462385p26463284.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26463279</id>
	<title>Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-21T23:21:07Z</published>
	<updated>2009-11-21T23:21:07Z</updated>
	<author>
		<name>Dmitry K.</name>
	</author>
	<content type="html">&amp;gt; &amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25?
&lt;br&gt;&amp;gt; &amp;gt; eerd_byte.S:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clr &amp;nbsp; &amp;nbsp; ret_hi
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Does the AVR ABI require that r25 be zeroed in a function returning a
&lt;br&gt;&amp;gt; &amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&lt;br&gt;This is a misty point.
&lt;br&gt;Look an example:
&lt;br&gt;&lt;br&gt;&amp;nbsp; unsigned char foo1 (unsigned char *p)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; return *p;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; extern unsigned char ext2 (void);
&lt;br&gt;&amp;nbsp; int foo2 (void)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; return ext2() + 1;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;Old Avr-gcc (3.3 - 4.2) are clear R25 in both cases: foo1()
&lt;br&gt;and foo2(). &amp;nbsp;The new Avr-gcc (4.3.3 and 4.4.2) are not
&lt;br&gt;clear R25 in foo1().
&lt;br&gt;&lt;br&gt;Note, the function return value is present only in expression.
&lt;br&gt;So it is promoted to integer. So it would be better to clear
&lt;br&gt;R25 in foo1() only (at one place).
&lt;br&gt;&lt;br&gt;Possibly, it is needed to change eeprom_read_byte() definition
&lt;br&gt;to int return value. This can reduce summary size. Opinions?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Dmitry.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26463279&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26463279.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26462385</id>
	<title>Float equivalents to double functions</title>
	<published>2009-11-21T18:32:48Z</published>
	<updated>2009-11-21T18:32:48Z</updated>
	<author>
		<name>Andrew Hutchinson</name>
	</author>
	<content type="html">Could someone add float variations of common functions to avr libc - 
&lt;br&gt;this would match gcc expectations for available libc functions.
&lt;br&gt;&lt;br&gt;As float == double there is little effort required.
&lt;br&gt;&lt;br&gt;Also I note that this and similar functions would &amp;nbsp;avoids this hack on 
&lt;br&gt;TI benchmark, so it has practical use in code compatibility.
&lt;br&gt;&lt;br&gt;#include &amp;lt;math.h&amp;gt;
&lt;br&gt;&lt;br&gt;#ifdef	__AVR__
&lt;br&gt;# define atanf(x) atan(x)
&lt;br&gt;# define cosf(x) &amp;nbsp;cos(x)
&lt;br&gt;# define expf(x) &amp;nbsp;exp(x)
&lt;br&gt;# define logf(x) &amp;nbsp;log(x)
&lt;br&gt;# define sinf(x) &amp;nbsp;sin(x)
&lt;br&gt;# define sqrtf(x) sqrt(x)
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;&lt;br&gt;Andy
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26462385&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Float-equivalents-to-double-functions-tp26462385p26462385.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26441192</id>
	<title>[bug #28058] parameter checking in pgm_read_xxx()</title>
	<published>2009-11-20T02:32:07Z</published>
	<updated>2009-11-20T02:32:07Z</updated>
	<author>
		<name>Christophe Combelles-4</name>
	</author>
	<content type="html">&lt;br&gt;URL:
&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28058&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28058&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Summary: parameter checking in pgm_read_xxx()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: AVR C Runtime Library
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted by: wek
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Submitted on: Fri 20 Nov 2009 10:32:06 AM GMT
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Category: Feature Request
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Severity: 3 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: 5 - Normal
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item Group: Header files
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Percent Complete: 0%
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assigned to: None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Open/Closed: Open
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Discussion Lock: Any
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Release: Any
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fixed Release: None
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Details:
&lt;br&gt;&lt;br&gt;The pgm_read_xxx() functions in &amp;lt;avr/pgmspace.h&amp;gt; are currently implemented as
&lt;br&gt;macros, casting the parameter to (uint16_t). 
&lt;br&gt;&lt;br&gt;While the parameter is supposed to be a pointer, this enables to use any
&lt;br&gt;garbage (read: non-pointer expression used by error) quietly.
&lt;br&gt;&lt;br&gt;Opposed to this are the similar accessing functions in eeprom.h. 
&lt;br&gt;&lt;br&gt;It is therefore suggested, that these macros to be replaced by the following
&lt;br&gt;constructions:
&lt;br&gt;&lt;br&gt;// #define pgm_read_byte(address_short) &amp;nbsp; &amp;nbsp;pgm_read_byte_near(address_short)
&lt;br&gt;__attribute__((__always_inline__)) static uint8_t pgm_read_byte(const PROGMEM
&lt;br&gt;uint8_t *);
&lt;br&gt;static uint8_t pgm_read_byte(const PROGMEM uint8_t *addr) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; return __LPM((uint16_t)(addr));
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;// #define pgm_read_word(address_short) &amp;nbsp; &amp;nbsp;pgm_read_word_near(address_short)
&lt;br&gt;__attribute__((__always_inline__)) static uint16_t pgm_read_word(const
&lt;br&gt;PROGMEM uint16_t *);
&lt;br&gt;static uint16_t pgm_read_word(const PROGMEM uint16_t *addr) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; return __LPM_word((uint16_t)(addr));
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;// #define pgm_read_dword(address_short) &amp;nbsp;
&lt;br&gt;pgm_read_dword_near(address_short)
&lt;br&gt;__attribute__((__always_inline__)) static uint32_t pgm_read_dword(const
&lt;br&gt;PROGMEM uint32_t *);
&lt;br&gt;static uint32_t pgm_read_dword(const PROGMEM uint32_t *addr) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; return __LPM_dword((uint16_t)(addr));
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;I am not expert enough to judge whether the functions may be tagged also with
&lt;br&gt;the __pure__ attribute.
&lt;br&gt;&lt;br&gt;A discussion on the topic is on
&lt;br&gt;&lt;a href=&quot;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=85490&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=85490&lt;/a&gt;&amp;nbsp;.
&lt;br&gt;&lt;br&gt;Jan Waclawek
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; _______________________________________________________
&lt;br&gt;&lt;br&gt;Reply to this item at:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;lt;&lt;a href=&quot;http://savannah.nongnu.org/bugs/?28058&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/bugs/?28058&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&amp;nbsp; Message sent via/by Savannah
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://savannah.nongnu.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.nongnu.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26441192&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-bug--28058--parameter-checking-in-pgm_read_xxx%28%29-tp26441192p26441192.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26437418</id>
	<title>stdint.h problem with gcc</title>
	<published>2009-11-19T18:11:30Z</published>
	<updated>2009-11-19T18:11:30Z</updated>
	<author>
		<name>Andrew Hutchinson</name>
	</author>
	<content type="html">I have been going through the gcc tests for V4.5 and come across some 
&lt;br&gt;issues with avr-lic stdint.h
&lt;br&gt;&lt;br&gt;The tests that fails are gcc/gcc/testsuite/gcc.dg/c99-stdint-1.c
&lt;br&gt;&lt;br&gt;gcc will create it's own stdint.h and this is fine for V4.5. I have 
&lt;br&gt;attached this for reference.
&lt;br&gt;&lt;br&gt;The definition of UINT8_MAX is unsigned e.g. 255U - this fails test. 255 
&lt;br&gt;is ok
&lt;br&gt;wchar limits are not defined- ok we dont have wchar.h but we should 
&lt;br&gt;still define the types.
&lt;br&gt;&lt;br&gt;There is &amp;nbsp;another issue related to ptrdiff type. This is posted as gcc 
&lt;br&gt;bug - since it is possible that this particular subtest is inappropriate 
&lt;br&gt;for avr.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42114&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42114&lt;/a&gt;&lt;br&gt;&lt;br&gt;=================================================================
&lt;br&gt;/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
&lt;br&gt;&lt;br&gt;This file is part of GCC.
&lt;br&gt;&lt;br&gt;GCC is free software; you can redistribute it and/or modify
&lt;br&gt;it under the terms of the GNU General Public License as published by
&lt;br&gt;the Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;any later version.
&lt;br&gt;&lt;br&gt;GCC is distributed in the hope that it will be useful,
&lt;br&gt;but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;GNU General Public License for more details.
&lt;br&gt;&lt;br&gt;Under Section 7 of GPL version 3, you are granted additional
&lt;br&gt;permissions described in the GCC Runtime Library Exception, version
&lt;br&gt;3.1, as published by the Free Software Foundation.
&lt;br&gt;&lt;br&gt;You should have received a copy of the GNU General Public License and
&lt;br&gt;a copy of the GCC Runtime Library Exception along with this program;
&lt;br&gt;see the files COPYING3 and COPYING.RUNTIME respectively. &amp;nbsp;If not, see
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;. &amp;nbsp;*/
&lt;br&gt;&lt;br&gt;/*
&lt;br&gt;&amp;nbsp;* ISO C Standard: &amp;nbsp;7.18 &amp;nbsp;Integer types &amp;nbsp;&amp;lt;stdint.h&amp;gt;
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;&lt;br&gt;#ifndef _GCC_STDINT_H
&lt;br&gt;#define _GCC_STDINT_H
&lt;br&gt;&lt;br&gt;/* 7.8.1.1 Exact-width integer types */
&lt;br&gt;&lt;br&gt;#ifdef __INT8_TYPE__
&lt;br&gt;typedef __INT8_TYPE__ int8_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT16_TYPE__
&lt;br&gt;typedef __INT16_TYPE__ int16_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT32_TYPE__
&lt;br&gt;typedef __INT32_TYPE__ int32_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT64_TYPE__
&lt;br&gt;typedef __INT64_TYPE__ int64_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT8_TYPE__
&lt;br&gt;typedef __UINT8_TYPE__ uint8_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT16_TYPE__
&lt;br&gt;typedef __UINT16_TYPE__ uint16_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT32_TYPE__
&lt;br&gt;typedef __UINT32_TYPE__ uint32_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT64_TYPE__
&lt;br&gt;typedef __UINT64_TYPE__ uint64_t;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;/* 7.8.1.2 Minimum-width integer types */
&lt;br&gt;&lt;br&gt;typedef __INT_LEAST8_TYPE__ int_least8_t;
&lt;br&gt;typedef __INT_LEAST16_TYPE__ int_least16_t;
&lt;br&gt;typedef __INT_LEAST32_TYPE__ int_least32_t;
&lt;br&gt;typedef __INT_LEAST64_TYPE__ int_least64_t;
&lt;br&gt;typedef __UINT_LEAST8_TYPE__ uint_least8_t;
&lt;br&gt;typedef __UINT_LEAST16_TYPE__ uint_least16_t;
&lt;br&gt;typedef __UINT_LEAST32_TYPE__ uint_least32_t;
&lt;br&gt;typedef __UINT_LEAST64_TYPE__ uint_least64_t;
&lt;br&gt;&lt;br&gt;/* 7.8.1.3 Fastest minimum-width integer types */
&lt;br&gt;&lt;br&gt;typedef __INT_FAST8_TYPE__ int_fast8_t;
&lt;br&gt;typedef __INT_FAST16_TYPE__ int_fast16_t;
&lt;br&gt;typedef __INT_FAST32_TYPE__ int_fast32_t;
&lt;br&gt;typedef __INT_FAST64_TYPE__ int_fast64_t;
&lt;br&gt;typedef __UINT_FAST8_TYPE__ uint_fast8_t;
&lt;br&gt;typedef __UINT_FAST16_TYPE__ uint_fast16_t;
&lt;br&gt;typedef __UINT_FAST32_TYPE__ uint_fast32_t;
&lt;br&gt;typedef __UINT_FAST64_TYPE__ uint_fast64_t;
&lt;br&gt;&lt;br&gt;/* 7.8.1.4 Integer types capable of holding object pointers */
&lt;br&gt;&lt;br&gt;#ifdef __INTPTR_TYPE__
&lt;br&gt;typedef __INTPTR_TYPE__ intptr_t;
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINTPTR_TYPE__
&lt;br&gt;typedef __UINTPTR_TYPE__ uintptr_t;
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;/* 7.8.1.5 Greatest-width integer types */
&lt;br&gt;&lt;br&gt;typedef __INTMAX_TYPE__ intmax_t;
&lt;br&gt;typedef __UINTMAX_TYPE__ uintmax_t;
&lt;br&gt;&lt;br&gt;#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
&lt;br&gt;&lt;br&gt;/* 7.18.2 Limits of specified-width integer types */
&lt;br&gt;&lt;br&gt;#ifdef __INT8_MAX__
&lt;br&gt;# undef INT8_MAX
&lt;br&gt;# define INT8_MAX __INT8_MAX__
&lt;br&gt;# undef INT8_MIN
&lt;br&gt;# define INT8_MIN (-INT8_MAX - 1)
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT8_MAX__
&lt;br&gt;# undef UINT8_MAX
&lt;br&gt;# define UINT8_MAX __UINT8_MAX__
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT16_MAX__
&lt;br&gt;# undef INT16_MAX
&lt;br&gt;# define INT16_MAX __INT16_MAX__
&lt;br&gt;# undef INT16_MIN
&lt;br&gt;# define INT16_MIN (-INT16_MAX - 1)
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT16_MAX__
&lt;br&gt;# undef UINT16_MAX
&lt;br&gt;# define UINT16_MAX __UINT16_MAX__
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT32_MAX__
&lt;br&gt;# undef INT32_MAX
&lt;br&gt;# define INT32_MAX __INT32_MAX__
&lt;br&gt;# undef INT32_MIN
&lt;br&gt;# define INT32_MIN (-INT32_MAX - 1)
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT32_MAX__
&lt;br&gt;# undef UINT32_MAX
&lt;br&gt;# define UINT32_MAX __UINT32_MAX__
&lt;br&gt;#endif
&lt;br&gt;#ifdef __INT64_MAX__
&lt;br&gt;# undef INT64_MAX
&lt;br&gt;# define INT64_MAX __INT64_MAX__
&lt;br&gt;# undef INT64_MIN
&lt;br&gt;# define INT64_MIN (-INT64_MAX - 1)
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINT64_MAX__
&lt;br&gt;# undef UINT64_MAX
&lt;br&gt;# define UINT64_MAX __UINT64_MAX__
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#undef INT_LEAST8_MAX
&lt;br&gt;#define INT_LEAST8_MAX __INT_LEAST8_MAX__
&lt;br&gt;#undef INT_LEAST8_MIN
&lt;br&gt;#define INT_LEAST8_MIN (-INT_LEAST8_MAX - 1)
&lt;br&gt;#undef UINT_LEAST8_MAX
&lt;br&gt;#define UINT_LEAST8_MAX __UINT_LEAST8_MAX__
&lt;br&gt;#undef INT_LEAST16_MAX
&lt;br&gt;#define INT_LEAST16_MAX __INT_LEAST16_MAX__
&lt;br&gt;#undef INT_LEAST16_MIN
&lt;br&gt;#define INT_LEAST16_MIN (-INT_LEAST16_MAX - 1)
&lt;br&gt;#undef UINT_LEAST16_MAX
&lt;br&gt;#define UINT_LEAST16_MAX __UINT_LEAST16_MAX__
&lt;br&gt;#undef INT_LEAST32_MAX
&lt;br&gt;#define INT_LEAST32_MAX __INT_LEAST32_MAX__
&lt;br&gt;#undef INT_LEAST32_MIN
&lt;br&gt;#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)
&lt;br&gt;#undef UINT_LEAST32_MAX
&lt;br&gt;#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__
&lt;br&gt;#undef INT_LEAST64_MAX
&lt;br&gt;#define INT_LEAST64_MAX __INT_LEAST64_MAX__
&lt;br&gt;#undef INT_LEAST64_MIN
&lt;br&gt;#define INT_LEAST64_MIN (-INT_LEAST64_MAX - 1)
&lt;br&gt;#undef UINT_LEAST64_MAX
&lt;br&gt;#define UINT_LEAST64_MAX __UINT_LEAST64_MAX__
&lt;br&gt;&lt;br&gt;#undef INT_FAST8_MAX
&lt;br&gt;#define INT_FAST8_MAX __INT_FAST8_MAX__
&lt;br&gt;#undef INT_FAST8_MIN
&lt;br&gt;#define INT_FAST8_MIN (-INT_FAST8_MAX - 1)
&lt;br&gt;#undef UINT_FAST8_MAX
&lt;br&gt;#define UINT_FAST8_MAX __UINT_FAST8_MAX__
&lt;br&gt;#undef INT_FAST16_MAX
&lt;br&gt;#define INT_FAST16_MAX __INT_FAST16_MAX__
&lt;br&gt;#undef INT_FAST16_MIN
&lt;br&gt;#define INT_FAST16_MIN (-INT_FAST16_MAX - 1)
&lt;br&gt;#undef UINT_FAST16_MAX
&lt;br&gt;#define UINT_FAST16_MAX __UINT_FAST16_MAX__
&lt;br&gt;#undef INT_FAST32_MAX
&lt;br&gt;#define INT_FAST32_MAX __INT_FAST32_MAX__
&lt;br&gt;#undef INT_FAST32_MIN
&lt;br&gt;#define INT_FAST32_MIN (-INT_FAST32_MAX - 1)
&lt;br&gt;#undef UINT_FAST32_MAX
&lt;br&gt;#define UINT_FAST32_MAX __UINT_FAST32_MAX__
&lt;br&gt;#undef INT_FAST64_MAX
&lt;br&gt;#define INT_FAST64_MAX __INT_FAST64_MAX__
&lt;br&gt;#undef INT_FAST64_MIN
&lt;br&gt;#define INT_FAST64_MIN (-INT_FAST64_MAX - 1)
&lt;br&gt;#undef UINT_FAST64_MAX
&lt;br&gt;#define UINT_FAST64_MAX __UINT_FAST64_MAX__
&lt;br&gt;&lt;br&gt;#ifdef __INTPTR_MAX__
&lt;br&gt;# undef INTPTR_MAX
&lt;br&gt;# define INTPTR_MAX __INTPTR_MAX__
&lt;br&gt;# undef INTPTR_MIN
&lt;br&gt;# define INTPTR_MIN (-INTPTR_MAX - 1)
&lt;br&gt;#endif
&lt;br&gt;#ifdef __UINTPTR_MAX__
&lt;br&gt;# undef UINTPTR_MAX
&lt;br&gt;# define UINTPTR_MAX __UINTPTR_MAX__
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;#undef INTMAX_MAX
&lt;br&gt;#define INTMAX_MAX __INTMAX_MAX__
&lt;br&gt;#undef INTMAX_MIN
&lt;br&gt;#define INTMAX_MIN (-INTMAX_MAX - 1)
&lt;br&gt;#undef UINTMAX_MAX
&lt;br&gt;#define UINTMAX_MAX __UINTMAX_MAX__
&lt;br&gt;&lt;br&gt;/* 7.18.3 Limits of other integer types */
&lt;br&gt;&lt;br&gt;#undef PTRDIFF_MAX
&lt;br&gt;#define PTRDIFF_MAX __PTRDIFF_MAX__
&lt;br&gt;#undef PTRDIFF_MIN
&lt;br&gt;#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
&lt;br&gt;&lt;br&gt;#undef SIG_ATOMIC_MAX
&lt;br&gt;#define SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__
&lt;br&gt;#undef SIG_ATOMIC_MIN
&lt;br&gt;#define SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__
&lt;br&gt;&lt;br&gt;#undef SIZE_MAX
&lt;br&gt;#define SIZE_MAX __SIZE_MAX__
&lt;br&gt;&lt;br&gt;#undef WCHAR_MAX
&lt;br&gt;#define WCHAR_MAX __WCHAR_MAX__
&lt;br&gt;#undef WCHAR_MIN
&lt;br&gt;#define WCHAR_MIN __WCHAR_MIN__
&lt;br&gt;&lt;br&gt;#undef WINT_MAX
&lt;br&gt;#define WINT_MAX __WINT_MAX__
&lt;br&gt;#undef WINT_MIN
&lt;br&gt;#define WINT_MIN __WINT_MIN__
&lt;br&gt;&lt;br&gt;#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
&lt;br&gt;&lt;br&gt;#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
&lt;br&gt;&lt;br&gt;#undef INT8_C
&lt;br&gt;#define INT8_C(c) __INT8_C(c)
&lt;br&gt;#undef INT16_C
&lt;br&gt;#define INT16_C(c) __INT16_C(c)
&lt;br&gt;#undef INT32_C
&lt;br&gt;#define INT32_C(c) __INT32_C(c)
&lt;br&gt;#undef INT64_C
&lt;br&gt;#define INT64_C(c) __INT64_C(c)
&lt;br&gt;#undef UINT8_C
&lt;br&gt;#define UINT8_C(c) __UINT8_C(c)
&lt;br&gt;#undef UINT16_C
&lt;br&gt;#define UINT16_C(c) __UINT16_C(c)
&lt;br&gt;#undef UINT32_C
&lt;br&gt;#define UINT32_C(c) __UINT32_C(c)
&lt;br&gt;#undef UINT64_C
&lt;br&gt;#define UINT64_C(c) __UINT64_C(c)
&lt;br&gt;#undef INTMAX_C
&lt;br&gt;#define INTMAX_C(c) __INTMAX_C(c)
&lt;br&gt;#undef UINTMAX_C
&lt;br&gt;#define UINTMAX_C(c) __UINTMAX_C(c)
&lt;br&gt;&lt;br&gt;#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
&lt;br&gt;&lt;br&gt;#endif /* _GCC_STDINT_H */
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26437418&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/stdint.h-problem-with-gcc-tp26437418p26437418.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26418118</id>
	<title>Re: eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-18T16:01:03Z</published>
	<updated>2009-11-18T16:01:03Z</updated>
	<author>
		<name>Frédéric Nadeau-2</name>
	</author>
	<content type="html">&lt;a href=&quot;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage&lt;/a&gt;&lt;br&gt;This explain the why. Not sure about the ABI
&lt;br&gt;&lt;br&gt;On Wed, Nov 18, 2009 at 6:53 PM, Shaun Jackman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418118&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sjackman@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; eeprom_read_byte returns a uint8_t. Why does it clear r25?
&lt;br&gt;&amp;gt; eerd_byte.S:
&lt;br&gt;&amp;gt;        clr     ret_hi
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Does the AVR ABI require that r25 be zeroed in a function returning a
&lt;br&gt;&amp;gt; single byte? If not, this instruction could be removed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Shaun
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; AVR-libc-dev mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418118&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Frédéric Nadeau ing. jr
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418118&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26418118.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26418032</id>
	<title>eeprom_read_byte and clr ret_hi</title>
	<published>2009-11-18T15:53:10Z</published>
	<updated>2009-11-18T15:53:10Z</updated>
	<author>
		<name>Shaun Jackman</name>
	</author>
	<content type="html">eeprom_read_byte returns a uint8_t. Why does it clear r25?
&lt;br&gt;eerd_byte.S:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clr	ret_hi
&lt;br&gt;&lt;br&gt;Does the AVR ABI require that r25 be zeroed in a function returning a
&lt;br&gt;single byte? If not, this instruction could be removed.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Shaun
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26418032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/eeprom_read_byte-and-clr-ret_hi-tp26418032p26418032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26371441</id>
	<title>RE: Upcoming WinAVR release...</title>
	<published>2009-11-16T04:55:48Z</published>
	<updated>2009-11-16T04:55:48Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371441&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Jan Waclawek
&lt;br&gt;&amp;gt; Sent: Monday, November 16, 2009 5:42 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371441&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: RE: [avr-libc-dev] Upcoming WinAVR release...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; May be we looking forward also to a decent changelog, this time?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Mmm. Probably not. Sorry for the hassle.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371441&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Upcoming-WinAVR-release...-tp26356531p26371441.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26371251</id>
	<title>RE: Upcoming WinAVR release...</title>
	<published>2009-11-16T04:41:56Z</published>
	<updated>2009-11-16T04:41:56Z</updated>
	<author>
		<name>Jan Waclawek</name>
	</author>
	<content type="html">May be we looking forward also to a decent changelog, this time?
&lt;br&gt;&lt;br&gt;Jan Waclawek
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371251&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Upcoming-WinAVR-release...-tp26356531p26371251.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26364599</id>
	<title>RE: Upcoming WinAVR release...</title>
	<published>2009-11-15T15:03:13Z</published>
	<updated>2009-11-15T15:03:13Z</updated>
	<author>
		<name>Weddington, Eric</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26364599&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev-bounces+eric.weddington=atmel.com@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; [mailto:avr-libc-dev-bounces+eric.weddington=atmel.com@nongnu.
&lt;br&gt;&amp;gt; org] On Behalf Of Dmitry K.
&lt;br&gt;&amp;gt; Sent: Sunday, November 15, 2009 3:51 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26364599&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;avr-libc-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [avr-libc-dev] Upcoming WinAVR release...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sunday 15 November 2009 15:05, Weddington, Eric wrote:
&lt;br&gt;&amp;gt; &amp;gt; I will be making a new WinAVR release either in late 
&lt;br&gt;&amp;gt; November, or early
&lt;br&gt;&amp;gt; &amp;gt; December (my guess is that it will be the latter).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What version of GCC is planed?
&lt;br&gt;&amp;gt; Seems, the GCC 4.4.2 is good in comparison to 4.3 branch.
&lt;/div&gt;&lt;br&gt;For other internal reasons, the WinAVR release will be using 4.3.3. We are specifically not moving to 4.4.x.
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;AVR-libc-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26364599&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;AVR-libc-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.nongnu.org/mailman/listinfo/avr-libc-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Upcoming-WinAVR-release...-tp26356531p26364599.html" />
</entry>

</feed>
