Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.misty.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: Tue, 30 Aug 2016 13:44:48 -0400 Organization: Aioe.org NNTP Server Lines: 27 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-08-014@comp.compilers> References: <16-08-007@comp.compilers> <16-08-008@comp.compilers> <16-08-009@comp.compilers> <16-08-011@comp.compilers> <16-08-012@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="1254"; mail-complaints-to="abuse@iecc.com" Keywords: translator Posted-Date: 30 Aug 2016 14:31:22 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1736 On 2016-08-29 9:21 PM, Walter Banks wrote: > On 2016-08-29 1:52 PM, BartC wrote: >> I've played with source-to-source translators, and never managed >> to deal with comments properly and in the end gave up. ... > > How we handled the comments on the asm to asm translation was put > the whole sourceline into in our case a C statement // comment with > enough parsing information to tie it as well to the generated code. A > filter (In our case a compiler pragma) reprocessed the listing line. > It could have been done with a small post processing program quite > easily. > > It proved quite workable. Something else to think about for comments. The source level debugging format we often use ties generated code to both source files and listing files. The system I described above uses this information. We have often used this information on many different debug applications after post processing. In the asm to asm translations we have done it is quite strange to see a listing file for an target processor being stepped with a source file of the original processor. I think then same thing could be done with elf dwarf extensions as well. w..