[Firm] Fwd: Help with Firm

Matthias Braun matze at braunis.de
Mon Apr 11 19:07:47 CEST 2016



> Begin forwarded message:
> 
> From: Matthias Braun <matze at braunis.de>
> Subject: Re: [Firm] Help with Firm
> Date: March 3, 2016 at 7:00:54 PM PST
> To: Luiz Henrique Neves Bonifacio <luizhbonifacio at gmail.com>
> 
> Hi,
> 
> Libfirm is designed as a compiler that generates machine code from a mostly generic intermediate representation. One of the first steps in the backend is code selection which matches patterns in the generic intermediate representation and creates target specific nodes for them. These target specific nodes correspond to machine instructions as much as possible (a sparc_save node becomes a save instruction etc.) however there are things which we will delay for layer phases so there are some ps3udo instructions whcih will get expanded into multipleor no instructions later or we may change, remove and add machine insyructions in later backend phases.So there is a lot of correspondence but not a 100% one.
> 
> If what you are asking however is to transform a given sparc binary to a libfirm graph. This is not possible at the moment. While we have indeed nodes for most machine instructions you will neither find code which disassembles a binary, nor is our target node list exhaustive or models all possible dependencies (we just model the things necessary for our backend not everything the cpu offers). Adding such support to libfirm would be a very interesting project but is probably a massive undertaking and we don't have any plans for that at the moment.
> 
> Greetings
>     Matthias
> 
> On Mar 3, 2016, at 10:07 AM, Luiz Henrique Neves Bonifacio <luizhbonifacio at gmail.com <mailto:luizhbonifacio at gmail.com>> wrote:
> 
>> Hello, my name is Luiz and I wrote to you a few months ago, asking about a bug in libFIRM backend. 
>> Today, I have another question about a mapping between libFIRM and SPARCv8 instructions. My question is: 
>> "How can I create a correspondence between libFIRM and SPARCv8 Instructions like save %sp and restore?"
>> 
>> Let me be more specific: I want to convert a SPARCv8 programm in a IR (using libFIRM). However, I am having some issues when I found this type of instruction, because I can't find a way to relation the instruciont with the IR that libFIRM implements. 
>> 
>> Thank you for your time, 
>> _______________________________________________
>> Firm mailing list
>> Firm at ira.uni-karlsruhe.de <mailto:Firm at ira.uni-karlsruhe.de>
>> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/firm <https://lists.ira.uni-karlsruhe.de/mailman/listinfo/firm>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/firm/attachments/20160411/27161ea5/attachment.html>


More information about the Firm mailing list