<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14061390</id><updated>2011-04-21T15:27:56.233-07:00</updated><title type='text'>Summer of Code: GCC-CIL</title><subtitle type='html'>Development blog for the GCC-CIL project.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14061390.post-116246715236713820</id><published>2006-11-02T03:24:00.000-08:00</published><updated>2006-11-02T03:34:33.026-08:00</updated><title type='text'>Anyone interested in GCC-CIL?</title><content type='html'>Is anyone out there interested in GCC-CIL? It might be possible to prod me into finishing it. If you're interested, send a note to &amp;lt;jey#kottalam!net&amp;gt; with the proper symbols substituted.&lt;br /&gt;&lt;br /&gt;If you're wondering what happened to Summer of Code 2005: I broke my arm in August and couldn't spare any keystrokes to update the blog. In the end, I collected the $4500 (thanks Google!), had a lot of fun (thanks Miguel!), then quit college and got a job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-116246715236713820?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/116246715236713820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=116246715236713820' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/116246715236713820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/116246715236713820'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2006/11/anyone-interested-in-gcc-cil.html' title='Anyone interested in GCC-CIL?'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14061390.post-112346392310320819</id><published>2005-08-07T18:11:00.000-07:00</published><updated>2005-08-07T18:20:21.846-07:00</updated><title type='text'>Crunch Time</title><content type='html'>No, I'm not dead. I've just been a bit busy with my day job.&lt;br /&gt;&lt;br /&gt;I'm buckling down into crunch mode now. TODO list for the immediate future:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Implement passing and returning large types by value&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Generate pinvoke declarations for native code interop&lt;/li&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Prerequisite: work out details of a magical mechanism to fake the types of the pinvoked functions' arguments&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;Fix/Implement initialized variables&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Three weeks remaining.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-112346392310320819?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/112346392310320819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=112346392310320819' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112346392310320819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112346392310320819'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2005/08/crunch-time.html' title='Crunch Time'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14061390.post-112200873173666479</id><published>2005-07-21T21:48:00.000-07:00</published><updated>2005-07-21T22:05:31.743-07:00</updated><title type='text'>Types and linkers</title><content type='html'>The compiler is coming along well. Lately I've been hacking on aggregate types and the linker, along with the usual work on the CIL instruction generation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Aggregate Types&lt;/span&gt;&lt;br /&gt;For the first stage, I've just implemented aggregate types as chunks of memory of the appropriate size. That is, both char foo[28]; and struct X { int i; float f; char s[20]; }; are simply represented in the IL as an object of type "S28", or 28-byte type. I am planning to eventually emit the equivalent CIL types for each 'native' type. This would allow a number of advantages over the current technique: we can probably take advantage of CIL function overload resolution (currently I simply use the mangled names), and we can allow for proper interoperability with other CIL languages. For example, allowing C structs and C++ classes to be used from C#, VB, etc. I had originally planned to implement this from the start, but later realized that it would be difficult to implement correctly with my poor understanding of GCC and the CIL type system, and decided that my time would be better spent getting everything working first.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Linker&lt;/span&gt;&lt;br /&gt;Last week I wrote the first iteration of the linker in Python. The compiler emits "linker annotations" with information on types, methods, strings, global variables, and references to the aforementioned. The linker itself is a fairly simple python script which checks the references, removes duplicates, and rewrites its input. In the near future I plan to add support to the linker to automatically generate P/Invoke declarations for calls to native methods, and do some fixups on function calls where the prototype is not known ahead of time. Once the linker functionality stabilizes a bit, I think I'll reimplement it in C#.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-112200873173666479?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/112200873173666479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=112200873173666479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112200873173666479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112200873173666479'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2005/07/types-and-linkers_21.html' title='Types and linkers'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14061390.post-112038441191036152</id><published>2005-07-03T02:51:00.000-07:00</published><updated>2005-07-03T02:54:00.956-07:00</updated><title type='text'>"OK, so pointers work more or less... I think?"</title><content type='html'>Today's post's title is from the log message for revision 9. I implemented loads and stores through pointers.&lt;br /&gt;&lt;br /&gt;Also did some restructuring and cleaning up of the code and generated code, now that I have a better idea of things thanks to David Hanson's paper on lcc.NET.&lt;br /&gt;&lt;br /&gt;I should get rid of those fixed size buffers sometime soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-112038441191036152?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/112038441191036152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=112038441191036152' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112038441191036152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112038441191036152'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2005/07/ok-so-pointers-work-more-or-less-i.html' title='&quot;OK, so pointers work more or less... I think?&quot;'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14061390.post-112009556409675192</id><published>2005-06-29T18:34:00.000-07:00</published><updated>2005-06-29T18:44:57.933-07:00</updated><title type='text'>Progress so far</title><content type='html'>I began hacking on GCC-CIL shortly after the Summer of Code was announced, and right now enough has been implemented to compile some programs, but the backend is still far from complete. For an example, here's a C program I submitted with my Google Summer of Code application that solves the &lt;a href="http://www.math.utah.edu/%7Ealfeld/queens/queens.html"&gt;N-Queens Problem&lt;/a&gt; for N=8 (standard chessboard), and the corresponding output from the June 14 snapshot of GCC-CIL at optimization levels 0 and 1: &lt;a href="http://jey.kottalam.net/code/gcc-cil/nqueens.c"&gt;nqueens.c&lt;/a&gt; &lt;a href="http://jey.kottalam.net/code/gcc-cil/nqueens.0.s"&gt;nqueens.0.s&lt;/a&gt; &lt;a href="http://jey.kottalam.net/code/gcc-cil/nqueens.1.s"&gt;nqueens.1.s&lt;/a&gt; You'll need ilasm from mono, .NET or DotGNU to assemble and run the program. It was extremely satisfying to see a "real" program actually working. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-112009556409675192?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/112009556409675192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=112009556409675192' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112009556409675192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112009556409675192'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2005/06/progress-so-far.html' title='Progress so far'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14061390.post-112007487192807143</id><published>2005-06-29T13:17:00.000-07:00</published><updated>2005-06-29T13:20:20.546-07:00</updated><title type='text'>Hello, World!</title><content type='html'>Hello, world. My name is Jeyasankar "Jey" Kottalam, and I'm working on a &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-335.htm"&gt;CIL&lt;/a&gt; backend for &lt;a href="http://gcc.gnu.org/"&gt;GCC&lt;/a&gt; for &lt;a href="http://mono-project.com/"&gt;The Mono Project&lt;/a&gt; as part of &lt;a href="http://code.google.com/summerofcode.html"&gt;Google's Summer of Code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;"What??"&lt;br /&gt;GCC is a retargetable compiler (loosely, software that "translates" high-level computer programs into machine-level computer programs) developed by the &lt;a href="http://www.gnu.org/"&gt;GNU Project&lt;/a&gt;. GCC takes programs written in a variety of languages as input, and produces assembler output for any of dozens of target architectures. My task is to add support for generating code for the ECMA Common Language Infrastructure, more commonly known by the popular implementations of this standard,&lt;a href="http://www.microsoft.com/net/"&gt; Microsoft's .NET&lt;/a&gt; or &lt;a href="http://mono-project.com/"&gt;Ximian's Mono&lt;/a&gt;. The low-level IL used for expressing programs for the ECMA CLI is called "CIL", or the Common Intermediate Language. My modifications to GCC allow it to emit CIL.&lt;br /&gt;&lt;br /&gt;This is somewhat unique because the CLI is a stack architecture, and the target backend infrastructure in GCC is designed for register machines. My current approach is to generate CLI instructions directly from the optimized &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gccint/GIMPLE.html"&gt;GIMPLE&lt;/a&gt; trees, which is one of the internal representations used by GCC. Traditionally, GCC expands these GIMPLE trees into &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gccint/RTL.html"&gt;RTL &lt;/a&gt;(Register Transfer Langauge) instructions, and further optimization, register allocation, and code generation is performed. In other words, the current approach bypasses nearly all RTL-related portions of GCC. Some GCC hackers suggested that it may be possible to use RTL up to the register allocation stage, and emitting CIL from the RTL instructions at that point... but that's for later.&lt;br /&gt;&lt;br /&gt;"OK, so what?"&lt;br /&gt;This [theoretically] allows programmers to easily port or target existing code written in C, C++, Objective C, FORTRAN, Ada, Pascal, D, or anything else that has a GCC front end to the ECMA CLI platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14061390-112007487192807143?l=gcc-cil.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gcc-cil.blogspot.com/feeds/112007487192807143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14061390&amp;postID=112007487192807143' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112007487192807143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14061390/posts/default/112007487192807143'/><link rel='alternate' type='text/html' href='http://gcc-cil.blogspot.com/2005/06/hello-world.html' title='Hello, World!'/><author><name>Jey Kottalam</name><uri>http://www.blogger.com/profile/10351561986904045943</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
