[cfe-dev] How to translate ISA of LLVM dinamically!

zhunan zhunansjtu at gmail.com
Tue Jun 30 07:14:24 PDT 2009


hi,all
      * I want to translate ISA of LLVM to another kind of ISA one by
        one,for example,I write a loader which can load ".o" file which
        is generated by "llvm-gcc abc.c -emit-llvm -c",and then I want
        to analysis it and translate it to another kind of ISA
        dinamically!Unforunately,I have not found any binary encoding
        information about LLVM's ISA,so it's impossible for me to
        implement it now.
      * 
      * Who can give me some instructions on it? Thanks!
      * 
      * -zhunan_sjtu



在 2009-06-30二的 07:01 -0500,cfe-dev-request at cs.uiuc.edu写道:
> Send cfe-dev mailing list submissions to
> 	cfe-dev at cs.uiuc.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> or, via email, send a message with subject or body 'help' to
> 	cfe-dev-request at cs.uiuc.edu
> 
> You can reach the person managing the list at
> 	cfe-dev-owner at cs.uiuc.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cfe-dev digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: incompatible redeclaration of library function (Eli Friedman)
>    2. Re: Can no longer build Clang with MSVC (C?dric Venet)
>    3. Re: A bunch of more or less related issues (Olaf Krzikalla)
>    4. Urgent fix for MSVC (Olaf Krzikalla)
>    5. A patch for printing policy and other stuff (Olaf Krzikalla)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 30 Jun 2009 01:05:18 -0700
> From: Eli Friedman <eli.friedman at gmail.com>
> Subject: Re: [cfe-dev] incompatible redeclaration of library function
> To: Henrique Almeida <hdante at gmail.com>
> Cc: cfe-dev at cs.uiuc.edu
> Message-ID:
> 	<f5aa3e9b0906300105t448e69e5i79205379b383d601 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Tue, Jun 30, 2009 at 12:22 AM, Henrique Almeida<hdante at gmail.com> wrote:
> > size_t is a typedef for unsigned long.
> 
> clang internally defines size_t according to the selected target;
> what's your CPU/OS?  Or are you trying to do something unusual?
> (-fno-builtin will get rid of this warning, but it's kind of overkill
> in this case).
> 
> -Eli
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 30 Jun 2009 10:14:00 +0200
> From: C?dric Venet <cedric.venet at laposte.net>
> Subject: Re: [cfe-dev] Can no longer build Clang with MSVC
> To: Olaf Krzikalla <Olaf.Krzikalla at tu-dresden.de>
> Cc: cfe-dev <cfe-dev at cs.uiuc.edu>
> Message-ID: <4A49C948.2030600 at laposte.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Olaf Krzikalla a ?crit :
> > Chris Lattner schrieb:
> >   
> >> AFAICT, this patch hasn't been applied and doesn't apply anymore.  Is 
> >> it still needed?
> >>
> >> -Chris
> >>     
> >
> > Well, 'needed' is carrying things too far. But it would be nice, definitely.
> >   
> 
> I can commit something if there is an agrement, I just need the list of 
> warning to disable (I don't have the time to sort them at the moment).
> Perhaps more important, the build is currently broken on windows. should 
> one of the proposed patch be applied, temporarilly?
> 
> C?dric
> 
> ps: this was not a svn patch, this is probably why it didn't apply.
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 30 Jun 2009 12:06:19 +0200
> From: Olaf Krzikalla <Olaf.Krzikalla at tu-dresden.de>
> Subject: Re: [cfe-dev] A bunch of more or less related issues
> To: cfe-dev at cs.uiuc.edu
> Message-ID: <4A49E39B.4050008 at tu-dresden.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi @clang,
> 
> take this post as an answer to all responses.
> 
> Eli Friedman schrieb:
> > On Mon, Jun 29, 2009 at 9:06 AM, Olaf
> > Krzikalla<Olaf.Krzikalla at tu-dresden.de> wrote:
> >   
> >> Hi @clang,
> >>
> >> while working on AST processing I stumbled over the one or another
> >> little quirk. I like to point them out now before the list becomes too long:
> >>
> >> 1. Why StmtPrinter::Indent always indent with two spaces hence
> >> effectively doubling the indent? It cost me a while to find that out as
> >> it is IMHO unexprected.
> >>     
> >
> > From a brief investigation, I think that's simply a bug; patch welcome.
> >   
> OK. I hope it's not a big problem, since existing code works a little
> bit different after the change, i.e. it doesn't conform to the 'one true
> way' by default anymore ;).
> 
> >> 2. What is the full expression according to ISO in "if (int a = expr)"?
> >> IMHO it is expr, but I'm not really sure since I saw CXXConditionDeclExpr.
> >>     
> >
> > ISO isn't really relevant here, I think.  The way the AST is
> > structured, the if statement contains an CXXConditionDeclExpr, which
> > references the decl; "expr" is simply the intialializer for "a".
> >   
> This one I should elaborate: what I have here is a new function
> ParentMap::getFullExpression. At the moment this function simply
> traverses the parent statement tree until a non-expr statement is found.
> Of course I want to have the function doing its thing right, that is
> yield the full expression according to ISO. Thatswhy I'm asking: IMHO  I
> should handle CXXConditionDeclExpr like a non-expr statement, but I'm
> only 99% sure.
> 
> For the rest I'm going to post patches in the near future (probably
> despite the seimcolon issue).
> 
> Best
> Olaf Krzikalla
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Tue, 30 Jun 2009 12:58:50 +0200
> From: Olaf Krzikalla <Olaf.Krzikalla at tu-dresden.de>
> Subject: [cfe-dev] Urgent fix for MSVC
> To: cfe-dev at cs.uiuc.edu, llvmdev at cs.uiuc.edu
> Message-ID: <4A49EFEA.1040509 at tu-dresden.de>
> Content-Type: text/plain; charset="iso-8859-15"
> 
> See the patch and the documentation:
> 
> http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx
> 
> With the patch all compiles fine. Otherwise MSVC breaks rightly.
> 
> Best
> Olaf Krzikalla
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: assertfix.patch
> Url: http://lists.cs.uiuc.edu/pipermail/cfe-dev/attachments/20090630/a3336345/attachment-0001.pl 
> 
> ------------------------------
> 
> Message: 5
> Date: Tue, 30 Jun 2009 14:01:18 +0200
> From: Olaf Krzikalla <Olaf.Krzikalla at tu-dresden.de>
> Subject: [cfe-dev] A patch for printing policy and other stuff
> To: cfe-dev at cs.uiuc.edu
> Message-ID: <4A49FE8E.30203 at tu-dresden.de>
> Content-Type: text/plain; charset="iso-8859-15"
> 
> Hi @clang,
> 
> I've created a patch for some of the issues discussed earlier in "A 
> bunch of more or less related issues" and some other things:
> Into the details:
> 
> 1. In ParentMap I added a function "addStmt" which actually adds a 
> Statement or updates the parent relations of an already existing 
> statement. Due to the second functionality I'm rather unsure with the 
> name but updateStmt sounds not right too as it conceals the add part.
> 2. In  PrinterHelper::handledStmt I introduced the IndentLevel. This can 
> be useful if someone (e.g. me) want to print something before a 
> particular statement (e.g. a comment) properly formatted. This affected 
> AST/CFG.cpp.
> 3. PrintingPolicy gets a new property IndentStyle. At the moment this 
> property is only evaluated in StmtPrinter.
> 4. A harmless but useful typedef in StmtVisitor.
> 
> Best
> Olaf Krzikalla
> 
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: printingStuff.patch
> Url: http://lists.cs.uiuc.edu/pipermail/cfe-dev/attachments/20090630/76a51e7d/attachment.pl 
> 
> ------------------------------
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> 
> End of cfe-dev Digest, Vol 24, Issue 60
> ***************************************




More information about the cfe-dev mailing list