2 ms·
> Cortex-A processors that support both Thumb and ARM instructions almost never actually switch at all. That is not correct. At least before ARMv8, most proce
by AshamedCaptain 5y ago
> Cortex-A processors that support both Thumb and ARM instructions almost never actually switch at all.
That is not correct. At least before ARMv8, most processors that could run both Thumb and ARM switch very frequently, up the point some libraries could be Thumb while others were ARM (i.e. within the same task!). A lot (but not all) of Android for ARMv7 is actually Thumb(-2). This is why "interworking" is such a hot topic.
Also, contrary to what the above poster says, switching does not have a "high cost", it is rather similar to the cost of a function call.
- stephencanon 5y ago> it is rather similar to the cost of a function call. It literally is a function call, most of the time. And yeah, thumb-2 was the preferred encoding for 32b iOS and Android, and the only supported encoding for Windows phone, so it was used on billions of devices.