<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Machine Code &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/machine-code/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Fri, 27 Apr 2018 15:32:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.8</generator>
	<item>
		<title>Compilers 108 &#8211; Code Generation</title>
		<link>https://blog.xojo.com/2018/03/26/compilers-108-code-generation/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Mon, 26 Mar 2018 09:00:21 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Machine Code]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=3676</guid>

					<description><![CDATA[This is the eighth post in our Compiler series. Code generation is one of the last steps of the compiler. This is where the compiler emits actual machine code for the IR that was previously created.]]></description>
										<content:encoded><![CDATA[<p>Code generation is one of the last steps of the compiler. This is where the compiler emits actual machine code for the IR that was previously created.</p>
<p>This is the eighth post in our Compiler series. Other posts:</p>
<ul>
<li><a href="https://blog.xojo.com/2017/12/04/llvm-everywhere/">LLVM Everywhere</a></li>
<li><a href="https://blog.xojo.com/2017/12/06/compilers-101-overview-and-lexer/">Compilers 101 &#8211; Overview and Lexer</a></li>
<li><a href="https://blog.xojo.com/2017/12/08/compilers-102-parser/">Compilers 102 &#8211; Parser</a></li>
<li><a href="https://blog.xojo.com/2018/01/22/compilers-103-semantic-analyzer/">Compilers 103 &#8211; Semantic Analyzer</a></li>
<li><a href="https://blog.xojo.com/2018/01/24/compilers-104-ir-generation/">Compilers 104 &#8211; IR Generation</a></li>
<li><a href="https://blog.xojo.com/2018/01/29/compilers-105-back-end-overview/">Compilers 105 &#8211; Back End Overview</a></li>
<li><a href="https://blog.xojo.com/2018/01/31/compilers-106-optimizer/">Compilers 106 &#8211; Optimizer</a></li>
<li><a href="https://blog.xojo.com/2018/03/19/compilers-107-optimizer-loop-unrolling/">Compilers 107 &#8211; Optimizer Loop Unrolling</a></li>
</ul>
<p><span id="more-3676"></span></p>
<p>This is the simple code we started with in the <a href="https://blog.xojo.com/2017/12/06/compilers-101-overview-and-lexer/">Compilers 101 blog post</a>:</p>
<pre>sum = 3.14 + 2 * 4 // calculation</pre>
<p>It results in a constant value of 11. After the IR is generated and optimized, it can boil down to just a single line of <a href="https://en.wikipedia.org/wiki/Machine_code">machine code</a>, which will vary by processor and architecture. Machine code is just binary and not readable, so below is what the <a href="https://en.wikipedia.org/wiki/Assembly_language">Assembly code</a> might look like.</p>
<p>This is the Assembly code for 32-bit ARM:</p>
<pre>movs r0, #11</pre>
<p>This is the Assembly code for ARM64:</p>
<pre>movz w0, #11</pre>
<p>x86 and x86-64 use this Assembly code:</p>
<pre>movl $11, %eax</pre>
<p>Obviously this is the tricky part of making a multi-platform compiler since Assembly code is different between processors and architectures.</p>
<p>Once you have machine code that the computer can run, the last step is to link all the pieces together so that you have an app that the OS can run. This is done by the <a href="https://blog.xojo.com/2018/04/02/compilers-109-linking-and-wrap-up/">Linker</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Where is 64-Bit Debugging for Windows?</title>
		<link>https://blog.xojo.com/2017/03/28/where-is-64-bit-debugging-for-windows/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Tue, 28 Mar 2017 19:30:22 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[LLVM]]></category>
		<category><![CDATA[Machine Code]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2522</guid>

					<description><![CDATA[Xojo 2017 Release 1 includes support for running and debugging 64-bit apps right from the IDE for macOS and Linux. Windows support is noticeably absent because we have been moving Xojo from our own compiler back end to using LLVM.]]></description>
										<content:encoded><![CDATA[<p><a href="http://developer.xojo.com/2017r1-release-notes">Xojo 2017 Release 1</a> includes support for running and debugging 64-bit apps right from the IDE for macOS and Linux. Windows support is noticeably absent. Why? The answer is a bit complicated but interesting.</p>
<p><span id="more-2522"></span></p>
<p>As you may know, Xojo&#8217;s compiler takes the code you write and translates it into a sort of meta-assembly language. Think of it as assembly code that is not specific to any particular processor. This part of the compiler is called the <em>Front End</em>. The <em>Back End</em> of the compiler takes that meta-assembly code and translates it into actual machine code for a particular processor such as x86 or ARM. We have been moving Xojo from our own compiler Back End to using an open source one known as <em>LLVM</em> which is used by Apple and others as well. It&#8217;s how we are building for 64-bit and it optimizes your code for speed, something our old compiler Back End did not do.</p>
<p>We depend on LLVM to provide us with the data we need to make debugging work. LLVM version 3.7 had the necessary support for macOS and Linux. LLVM version 4 has added this for Windows but it was released only a few weeks ago, not enough time for us to get it working for today&#8217;s release of Xojo 2017 Release 1. Although you don&#8217;t directly see LLVM when you use Xojo, it&#8217;s doing significant and important work. Switching from one major release of LLVM to another affects far more than just debugging so it must be done very early in our development of a release of Xojo. It&#8217;s likely that 64-bit debugging support for Windows will be available in Xojo 2017 Release 2.</p>
<p>64-bit support in Xojo may seem like a minor feature. After all, for most of you, switching from 32 to 64-bit is a single-click operation. However, for it to be that simple has required a huge amount of effort on our part. While you can still get by with 32-bit apps in most cases today, that won&#8217;t be true in the not-too-distant future. That&#8217;s why it&#8217;s critical we make it easy for you to switch. The importance of Xojo supporting 64-bit really can&#8217;t be overstated.</p>
<p>Remember that many features in Xojo take multiple release cycles to complete. That means that when the feature list is short, there&#8217;s working going on for future releases. When it&#8217;s long, much of that work may have been done during previous release cycles. It&#8217;s a curious fact of software development that sometimes features that seem simple on the outside are actually large and complex on the inside.</p>
<p>There&#8217;s a lot more coming for Xojo in 2017 so stay tuned.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
