<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Hardwarebug</title>
	<atom:link href="http://hardwarebug.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://hardwarebug.org</link>
	<description>Everything is broken</description>
	<lastBuildDate>Tue, 15 May 2012 02:38:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on ARM inline asm secrets by Gregory Eckersley</title>
		<link>http://hardwarebug.org/2010/07/06/arm-inline-asm-secrets/comment-page-1/#comment-1429</link>
		<dc:creator>Gregory Eckersley</dc:creator>
		<pubDate>Tue, 15 May 2012 02:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=493#comment-1429</guid>
		<description>Thanks for your web page. The GCC constraints are unfathomably complex. I wanted 2 lines of assembly code as follows &quot; svc sym1&quot;, &quot;.word symbol2&quot;. No constraint would allow symbol2 defined either as a symbolic address or 32 bit constant. Some crashed gcc. e.g:
&lt;pre&gt;
#define svcgen(sym1,symbol2) __asm__(&quot;SVC %0\n\t .word %c1\n\t&quot; : : &quot;i&quot; (sym1) , &quot;i&quot; (symbol2)  : )
&lt;/pre&gt;
will accept 32 bit constants, not symbols when invoked.
&lt;pre&gt;
&quot;svcgen(0x40,32_bit_constant)&quot; works
&quot;svcgen(0x40,symbol)&quot; fails on constraint
&lt;/pre&gt;
My solution was:
&lt;pre&gt;
#define svcgen(sym1,symbol2) __asm__(&quot;SVC %0\n\t .word &quot; symbol2 &quot;\n\t&quot; : : &quot;i&quot; (sym1)   : )
&lt;/pre&gt;
Invoked by, e.g. :
&lt;pre&gt;
svcgen(0x40,&quot;c_variable_or_constant&quot;)
&lt;/pre&gt;
The main thing to realise is that gcc inline assembler
constraints,however silly, cannot be circumvented. Quotes at at least allowed the constraints to be dodged!

Your web page helped me realise this earlier - you are
definitely not trolling - thanks again. GPE</description>
		<content:encoded><![CDATA[<p>Thanks for your web page. The GCC constraints are unfathomably complex. I wanted 2 lines of assembly code as follows &#8221; svc sym1&#8243;, &#8220;.word symbol2&#8243;. No constraint would allow symbol2 defined either as a symbolic address or 32 bit constant. Some crashed gcc. e.g:</p>
<pre>
#define svcgen(sym1,symbol2) __asm__("SVC %0\n\t .word %c1\n\t" : : "i" (sym1) , "i" (symbol2)  : )
</pre>
<p>will accept 32 bit constants, not symbols when invoked.</p>
<pre>
"svcgen(0x40,32_bit_constant)" works
"svcgen(0x40,symbol)" fails on constraint
</pre>
<p>My solution was:</p>
<pre>
#define svcgen(sym1,symbol2) __asm__("SVC %0\n\t .word " symbol2 "\n\t" : : "i" (sym1)   : )
</pre>
<p>Invoked by, e.g. :</p>
<pre>
svcgen(0x40,"c_variable_or_constant")
</pre>
<p>The main thing to realise is that gcc inline assembler<br />
constraints,however silly, cannot be circumvented. Quotes at at least allowed the constraints to be dodged!</p>
<p>Your web page helped me realise this earlier &#8211; you are<br />
definitely not trolling &#8211; thanks again. GPE</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ARM compiler shoot-out by A few things iOS developers ought to know about the ARM architecture &#171; AVATAR.Dev - iOS Developer Tips, Tricks and Tutorials.</title>
		<link>http://hardwarebug.org/2009/08/05/arm-compiler-shoot-out/comment-page-1/#comment-1377</link>
		<dc:creator>A few things iOS developers ought to know about the ARM architecture &#171; AVATAR.Dev - iOS Developer Tips, Tricks and Tutorials.</dc:creator>
		<pubDate>Mon, 23 Jan 2012 07:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=150#comment-1377</guid>
		<description>[...] While I’ve not tested it much, I have at least seen nice improvements on 64-bit integer code (a particularly weak point of GCC on ARM) when using LLVM. Hopefully, LLVM will prove to be an improvement over GCC in all domains. [...]</description>
		<content:encoded><![CDATA[<p>[...] While I’ve not tested it much, I have at least seen nice improvements on 64-bit integer code (a particularly weak point of GCC on ARM) when using LLVM. Hopefully, LLVM will prove to be an improvement over GCC in all domains. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ogg objections by Why didn&#039;t Google use OGG or MPEG-4 Part 12 as the container format for WebM? - Quora</title>
		<link>http://hardwarebug.org/2010/03/03/ogg-objections/comment-page-2/#comment-1349</link>
		<dc:creator>Why didn&#039;t Google use OGG or MPEG-4 Part 12 as the container format for WebM? - Quora</dc:creator>
		<pubDate>Sun, 06 Nov 2011 22:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=374#comment-1349</guid>
		<description>[...] add comment if you are logged out.&#160;&#160;2 Answers&#160;&#160;Kieran Kunhya, Homo Sapiens http://hardwarebug.org/2010/03/0... sums up the technical reasons behind why one would not want to use ogg. There&#039;s no technical [...]</description>
		<content:encoded><![CDATA[<p>[...] add comment if you are logged out.&nbsp;&nbsp;2 Answers&nbsp;&nbsp;Kieran Kunhya, Homo Sapiens <a href="http://hardwarebug.org/2010/03/0" rel="nofollow">http://hardwarebug.org/2010/03/0</a>&#8230; sums up the technical reasons behind why one would not want to use ogg. There&#039;s no technical [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pointer peril by Mans</title>
		<link>http://hardwarebug.org/2011/10/18/pointer-peril/comment-page-1/#comment-1322</link>
		<dc:creator>Mans</dc:creator>
		<pubDate>Thu, 20 Oct 2011 15:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=587#comment-1322</guid>
		<description>Your program prints the difference between two addresses, computation of which is, as you say, undefined. In this particular case, with your compiler, nothing unexpected happens. Undefined behaviour is not &lt;em&gt;required&lt;/em&gt; to do anything strange.</description>
		<content:encoded><![CDATA[<p>Your program prints the difference between two addresses, computation of which is, as you say, undefined. In this particular case, with your compiler, nothing unexpected happens. Undefined behaviour is not <em>required</em> to do anything strange.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pointer peril by Alexandre</title>
		<link>http://hardwarebug.org/2011/10/18/pointer-peril/comment-page-1/#comment-1321</link>
		<dc:creator>Alexandre</dc:creator>
		<pubDate>Thu, 20 Oct 2011 14:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=587#comment-1321</guid>
		<description>On my machine, the following function yields the same result with and without -O0 (gcc 4.5.2). According to my understanding of the specs, it relies on the same undefined behaviour. Or do I misunderstand &quot;array objects&quot;?

&lt;pre&gt;
#include &lt;stdio.h&gt;
#include &lt;stddef.h&gt;

void foo(int* addr_a) {
  int b;
  ptrdiff_t diff = addr_a - &amp;b;
  printf(&quot;&amp;a = %p   --- &amp;b = %p\n&quot;, addr_a, &amp;b);
  printf(&quot;diff = 0x%x\n&quot;, diff);
}

int main(void) {
  int a;
  foo(&amp;a);
  return 0;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>On my machine, the following function yields the same result with and without -O0 (gcc 4.5.2). According to my understanding of the specs, it relies on the same undefined behaviour. Or do I misunderstand &#8220;array objects&#8221;?</p>
<pre>
#include &lt;stdio.h&gt;
#include &lt;stddef.h&gt;

void foo(int* addr_a) {
  int b;
  ptrdiff_t diff = addr_a - &amp;b;
  printf("&amp;a = %p   --- &amp;b = %p\n", addr_a, &amp;b);
  printf("diff = 0x%x\n", diff);
}

int main(void) {
  int a;
  foo(&amp;a);
  return 0;
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pointer peril by Rémi Denis-Courmont</title>
		<link>http://hardwarebug.org/2011/10/18/pointer-peril/comment-page-1/#comment-1320</link>
		<dc:creator>Rémi Denis-Courmont</dc:creator>
		<pubDate>Tue, 18 Oct 2011 14:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=587#comment-1320</guid>
		<description>As far as I know, nothing in the C standard promises that a and b are on a sizeof(int) address boundary. So even without optimizations, you could still have rounding errors ;-) depending on the ABI obviously.</description>
		<content:encoded><![CDATA[<p>As far as I know, nothing in the C standard promises that a and b are on a sizeof(int) address boundary. So even without optimizations, you could still have rounding errors ;-) depending on the ABI obviously.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pointer peril by Kostya</title>
		<link>http://hardwarebug.org/2011/10/18/pointer-peril/comment-page-1/#comment-1319</link>
		<dc:creator>Kostya</dc:creator>
		<pubDate>Tue, 18 Oct 2011 07:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=587#comment-1319</guid>
		<description>I wonder how many bugs were reported for GCC producing &quot;wrong&quot; code when pointer aliasing is used. Or other things that ignore undefined behaviour.

All world runs on x86 CPUs after all...</description>
		<content:encoded><![CDATA[<p>I wonder how many bugs were reported for GCC producing &#8220;wrong&#8221; code when pointer aliasing is used. Or other things that ignore undefined behaviour.</p>
<p>All world runs on x86 CPUs after all&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ARM inline asm secrets by Julien</title>
		<link>http://hardwarebug.org/2010/07/06/arm-inline-asm-secrets/comment-page-1/#comment-1313</link>
		<dc:creator>Julien</dc:creator>
		<pubDate>Tue, 10 May 2011 01:09:07 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=493#comment-1313</guid>
		<description>This seems fixed in gcc 4.5.</description>
		<content:encoded><![CDATA[<p>This seems fixed in gcc 4.5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Shades of black by av500</title>
		<link>http://hardwarebug.org/2011/02/14/shades-of-black/comment-page-1/#comment-1284</link>
		<dc:creator>av500</dc:creator>
		<pubDate>Mon, 14 Feb 2011 22:38:07 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=575#comment-1284</guid>
		<description>46 DC EA ...</description>
		<content:encoded><![CDATA[<p>46 DC EA &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Shades of black by Mans</title>
		<link>http://hardwarebug.org/2011/02/14/shades-of-black/comment-page-1/#comment-1282</link>
		<dc:creator>Mans</dc:creator>
		<pubDate>Mon, 14 Feb 2011 15:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://hardwarebug.org/?p=575#comment-1282</guid>
		<description>I ended up getting a Sony VAIO Z1.  Go on, ridicule me for paying the Sony tax.  You know you&#039;ll enjoy it.</description>
		<content:encoded><![CDATA[<p>I ended up getting a Sony VAIO Z1.  Go on, ridicule me for paying the Sony tax.  You know you&#8217;ll enjoy it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

