<?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 on: When do you use your compiler’s inline assembler feature and for what reasons?</title>
	<atom:link href="http://www.embeddedinsights.com/channels/2010/09/01/when-do-you-use-your-compiler%e2%80%99s-inline-assembler-feature-and-for-what-reasons/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.embeddedinsights.com/channels/2010/09/01/when-do-you-use-your-compiler%e2%80%99s-inline-assembler-feature-and-for-what-reasons/</link>
	<description>Shedding Light on the Hidden World of Embedded Systems</description>
	<lastBuildDate>Mon, 28 Jul 2014 16:18:37 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: N.M. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/09/01/when-do-you-use-your-compiler%e2%80%99s-inline-assembler-feature-and-for-what-reasons/#comment-1821</link>
		<dc:creator>N.M. @ LI</dc:creator>
		<pubDate>Fri, 03 Sep 2010 03:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=296#comment-1821</guid>
		<description>A.&#039;s right. The last time I used inline assembly was yesterday and it was to ensure the correct atomic instruction was generated.</description>
		<content:encoded><![CDATA[<p>A.&#8217;s right. The last time I used inline assembly was yesterday and it was to ensure the correct atomic instruction was generated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A.H. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/09/01/when-do-you-use-your-compiler%e2%80%99s-inline-assembler-feature-and-for-what-reasons/#comment-1820</link>
		<dc:creator>A.H. @ LI</dc:creator>
		<pubDate>Fri, 03 Sep 2010 03:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=296#comment-1820</guid>
		<description>Expanding on J.&#039;s response above - the most obvious is when you need a true semaphore and the compiler is unable (or the compiler writer is unwilling) to use an atomic instruction E.G TAS (test and set) on the Freescale Coldfire processors. The TAS instruction is atomic - guaranteed to be uninterrupted - and so saves having to disable interrupts, test a semaphore and set if unset, then re-enable interrupts. In several examples of RTOS this has not been the default mechanism and so an InLine TAS can solve a problem where interrupts can be disabled when they don&#039;t need to be.

Obviously a very specific case but one that has very real results in performance and reliability.</description>
		<content:encoded><![CDATA[<p>Expanding on J.&#8217;s response above &#8211; the most obvious is when you need a true semaphore and the compiler is unable (or the compiler writer is unwilling) to use an atomic instruction E.G TAS (test and set) on the Freescale Coldfire processors. The TAS instruction is atomic &#8211; guaranteed to be uninterrupted &#8211; and so saves having to disable interrupts, test a semaphore and set if unset, then re-enable interrupts. In several examples of RTOS this has not been the default mechanism and so an InLine TAS can solve a problem where interrupts can be disabled when they don&#8217;t need to be.</p>
<p>Obviously a very specific case but one that has very real results in performance and reliability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.G. @ LI</title>
		<link>http://www.embeddedinsights.com/channels/2010/09/01/when-do-you-use-your-compiler%e2%80%99s-inline-assembler-feature-and-for-what-reasons/#comment-1819</link>
		<dc:creator>J.G. @ LI</dc:creator>
		<pubDate>Fri, 03 Sep 2010 03:47:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.embeddedinsights.com/channels/?p=296#comment-1819</guid>
		<description>It&#039;s rarely necessary to use inline assembler in applications space. Usually, using the optimizer results in improving performance or code size to an extent similar to assembler. There are a few exceptions and those are usually when the processor offers instructions that are particularly well suited to an algorithm and the compiler does not generate those instructions. In this case, write the algorithm in the compiler language , say C, and then in assembler, finally enclose this in conditional compile statements. You retain portability and still get the benefit you are looking for on a specific architecture.

At the OS level, sometimes assembler is the best way to go but those instances tend to be rare.</description>
		<content:encoded><![CDATA[<p>It&#8217;s rarely necessary to use inline assembler in applications space. Usually, using the optimizer results in improving performance or code size to an extent similar to assembler. There are a few exceptions and those are usually when the processor offers instructions that are particularly well suited to an algorithm and the compiler does not generate those instructions. In this case, write the algorithm in the compiler language , say C, and then in assembler, finally enclose this in conditional compile statements. You retain portability and still get the benefit you are looking for on a specific architecture.</p>
<p>At the OS level, sometimes assembler is the best way to go but those instances tend to be rare.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
