Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Walter Banks Newsgroups: comp.compilers Subject: Re: New experimental back end for C/C++ compiler targeting CLI Date: Mon, 29 Aug 2016 13:15:49 -0400 Organization: Aioe.org NNTP Server Lines: 24 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-08-010@comp.compilers> References: <16-08-007@comp.compilers> <16-08-008@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="25071"; mail-complaints-to="abuse@iecc.com" Keywords: translator Posted-Date: 29 Aug 2016 15:00:09 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 2196 X-Received-Body-CRC: 1651566674 Xref: csiph.com comp.compilers:1732 On 2016-08-26 3:54 PM, rockbrentwood@gmail.com wrote: > On Thursday, August 25, 2016 at 10:17:46 AM UTC-5, Alexandre wrote: >> Btw, at now, is just a experimental project, it's not build every >> C program... > A really good source-to-source compiler should also be making proper > adjustments to the comments. That may even entail a degree of natural > language processing! Except for the "may" part. I have done a few source to source asm compilers that include retaining the original comments and sources. What I did was rewrote the asm back-end to emit simple C statements and then compiling these to the new target processor. For real life applications it is an 85% solution. It gets the machine code correct for the target processor but there are I/O code that is so architectural specific that it needs to be hand translated. The interesting part is the code transformation part works really well. To the extent that generated code is often smaller because most C compilers do very well with small statements and using C as an intermediate form isolates most of the processor specific processor issues. w..