Comment 6 for bug 490792

Revision history for this message
In , Jacob Bramley (jacob-bramley) wrote :

There is a slight complexity cost if we want to support ARMv4 and ARMv4T cores.
 * ARMv4 (~ARM7) didn't have Thumb support, and doesn't understand the BX instruction.
 * ARMv4T (~ARM7TDMI) understands BX, but not BLX, so interworking has an associated cost on ARMv4T.
 * ARMv5 and onwards are much easier to deal with. They support BLX, which does everything in one instruction, but to honest I'm not sure if interworking impacts performance at all. I would guess that it doesn't, but I have no figure to back this up.

More details are available on a handy table on this page: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204i/Cihfddaf.html

--- ARMv4(T)

ARMv4 is pretty unusual, and I doubt that anyone would want to run TM on it. However, I have no figure to back this up so I can't say for sure. I think the best-known ARMv4 chip is the StrongARM. ARMv4T includes most ARM7 variants (such as the ARM7TDMI) and a few ARM9 variants. The GP2X, for example, has an ARMv4T ARM9 in it (according to Wikipedia).

--- Code

The code itself is easy enough to write, and I already have an old Tamarin patch to work from so it won't take me long to implement the interwork code itself. I won't be able to generate simple or automatable tests, though.

Intra-trace branches are no problem at all because the target is known to be ARM code.

--- Thumb2 for Trace Monkey Itself

I do think that compiling TM for Thumb-2 would be beneficial. Even if we don't do this now, it could be useful in the future. T2 gives you almost the performance of ARM with the code size of T1, so even though it's not supported on ARM1176, it could be worth doing.

In any case, if we want to support interworking branches anyway we will automatically support interworking into a potential future T2 TM.