[llvm-commits] [PATCH] JIT support for ARM
Raul Fernandes Herbster
raulherbster at gmail.com
Fri Aug 17 17:15:12 PDT 2007
Yes, Chris. I'd have to create a big switch table.
2007/8/17, Chris Lattner <clattner at apple.com>:
>
>
> On Aug 17, 2007, at 12:02 PM, Evan Cheng wrote:
>
> > void *ARMJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter
> > &MCE) {
> > - unsigned addr = (intptr_t)Fn-MCE.getCurrentPCValue()-4;
> > + unsigned addr = (intptr_t)Fn;
> > // If this is just a call to an external function, emit a branch
> > instead of a
> > // call. The code is the same except for one bit of the last
> > instruction.
> > if (Fn != (void*)(intptr_t)ARMCompilationCallback) {
> > + // branch to the corresponding function addr
> > + MCE.startFunctionStub(8, 4);
> > + MCE.emitWordLE(0xE51FF004); // LDR PC, [PC,#-4]
> >
> > This is ok.... But I would rather see you refactor
> > getBinaryCodeForInstr() so you can "manufacture" the value by
> > passing it ARM::LDR, ARM::PC, etc.? Do you think that's possible?
>
> This probably isn't possible, because it would require creating a
> machineinstr to pass in. Other JITs do similar things :(
>
> -Chris
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Raul Fernandes Herbster
Embedded and Pervasive Computing Laboratory - embedded.dee.ufcg.edu.br
Electrical Engineering Department - DEE - www.ee.ufcg.edu.br
Electrical Engineering and Informatics Center - CEEI
Federal University of Campina Grande - UFCG - www.ufcg.edu.br
Caixa Postal 10105
58109-970 Campina Grande - PB - Brasil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070817/7a8a350a/attachment.html>
More information about the llvm-commits
mailing list