Yes, Chris. I'd have to create a big switch table. 2007/8/17, Chris Lattner <[EMAIL PROTECTED]>: > > > 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@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
_______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits