<?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: Tamarin Tracing Internals III: LIR</title>
	<atom:link href="http://blog.mozilla.com/dmandelin/2008/05/23/tamarin-tracing-internals-iii-lir/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/dmandelin/2008/05/23/tamarin-tracing-internals-iii-lir/</link>
	<description>Just another Blog.mozilla.com weblog</description>
	<lastBuildDate>Wed, 25 Jan 2012 23:29:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rick Reitmaier</title>
		<link>http://blog.mozilla.com/dmandelin/2008/05/23/tamarin-tracing-internals-iii-lir/comment-page-1/#comment-534</link>
		<dc:creator>Rick Reitmaier</dc:creator>
		<pubDate>Thu, 29 May 2008 17:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/dmandelin/?p=16#comment-534</guid>
		<description>You may have already figured out most of this in subsequent
posts, but I&#039;m only now getting through your wonderful 
write-ups and thought I&#039;d post as I go if you don&#039;t mind.

Besides starting a trace along a loop edge , we can also start a trace
from the exit of another trace.

Regarding the LIR_sti being emitted as the RegionTrackers are updated...
These stores write back operation results to the interpreter stack (sp/rp).  We
had an earlier version of the code wherein, we the delayed stores until we 
were in the exit code and this resulted in an excessive amount of code
in the exits.  Not to mention most of it was duplicated many times over.

By placing the stores in the mainline we reduce the duplication and 
relive the exit code from having to manage them.  The cost of course
is that we are paying the price of a store on the main trace which 
may never be needed.     In compile() you&#039;ll notice that rmStores() 
attempts to reduce the redundant stores &#039;locally&#039; (that is between
guards).  It also tracks the top of stack(s) and removes any
stores that fall out of range.

Missing sequence numbers in LIR output.  We&#039;ve massaged
the output somewhat from what is actually in memory, attempting
to get rid of some of the extraneous information.   So using your
example: 

328 imm   #1
330 sti   #1, #16(8)

A LIR_tramp is used to extend the reach of instructions (remember
we use 8-bit relative addressing for the operands) and
was inserted in order to point to 8.  So strictly speaking we 
probably have something like;
 
  328 imm #1
  329 tramp 8
  330 sti 328,329,#16

By the way sti is identical to st, except the displacement
is contained directly in the instruction.  This is a memory 
optimization, which saves an instruction in the case of 
small displacements (&lt;256).</description>
		<content:encoded><![CDATA[<p>You may have already figured out most of this in subsequent<br />
posts, but I&#8217;m only now getting through your wonderful<br />
write-ups and thought I&#8217;d post as I go if you don&#8217;t mind.</p>
<p>Besides starting a trace along a loop edge , we can also start a trace<br />
from the exit of another trace.</p>
<p>Regarding the LIR_sti being emitted as the RegionTrackers are updated&#8230;<br />
These stores write back operation results to the interpreter stack (sp/rp).  We<br />
had an earlier version of the code wherein, we the delayed stores until we<br />
were in the exit code and this resulted in an excessive amount of code<br />
in the exits.  Not to mention most of it was duplicated many times over.</p>
<p>By placing the stores in the mainline we reduce the duplication and<br />
relive the exit code from having to manage them.  The cost of course<br />
is that we are paying the price of a store on the main trace which<br />
may never be needed.     In compile() you&#8217;ll notice that rmStores()<br />
attempts to reduce the redundant stores &#8216;locally&#8217; (that is between<br />
guards).  It also tracks the top of stack(s) and removes any<br />
stores that fall out of range.</p>
<p>Missing sequence numbers in LIR output.  We&#8217;ve massaged<br />
the output somewhat from what is actually in memory, attempting<br />
to get rid of some of the extraneous information.   So using your<br />
example: </p>
<p>328 imm   #1<br />
330 sti   #1, #16(8)</p>
<p>A LIR_tramp is used to extend the reach of instructions (remember<br />
we use 8-bit relative addressing for the operands) and<br />
was inserted in order to point to 8.  So strictly speaking we<br />
probably have something like;</p>
<p>  328 imm #1<br />
  329 tramp 8<br />
  330 sti 328,329,#16</p>
<p>By the way sti is identical to st, except the displacement<br />
is contained directly in the instruction.  This is a memory<br />
optimization, which saves an instruction in the case of<br />
small displacements (&lt;256).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaver</title>
		<link>http://blog.mozilla.com/dmandelin/2008/05/23/tamarin-tracing-internals-iii-lir/comment-page-1/#comment-512</link>
		<dc:creator>shaver</dc:creator>
		<pubDate>Sat, 24 May 2008 04:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.com/dmandelin/?p=16#comment-512</guid>
		<description>I&#039;ve learned more from your last 3 posts than from actually getting something up and tracing in an experimental hack.  I&#039;m not sure how I feel about that.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve learned more from your last 3 posts than from actually getting something up and tracing in an experimental hack.  I&#8217;m not sure how I feel about that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

