[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running armel on armv4 hardware



> Amother solution would be to emulate the thumb instructions linux uses by
> catching the illegal instruction signal in kernel space alla FPA emulators.

The problem isn't Thumb instructions per se, it's the ARM mode bx instruction.  
This is used by all code, even if you don't actively use Thumb mode. Trapping 
and emulating this is going to be hideously slow, adding hundreds or even 
thousands of extra cycles for every function call.  At that point it's 
probably quicker to just run the whole thing via an emulator[1].

FPA emulation traps are only practical because most code doesn't use floating 
point. As a rule of thumb I'd say It's typically an order of magnitude (~10x) 
slower than userspace soft-float, and ~100x slower than the average FPU.

Paul

[1] You don't need to emulate the whole machine, just the userspace portions 
of the cpu.  A specialised v5->v4 dynamic binary translator should be pretty 
straightforward and low overhead, especially if it has kernel assistance.


Reply to: