Does a pipeline stall occur on an ARM to Thumb switch?
问题 In ARM architecture, if an ARM to Thumb mode switch occurs, will a pipeline stall occur? If so, how many cycles are affected? Is this same for Thumb to ARM mode switching ? Does this behavior vary with different ARM processors ? 回答1: Assuming you switch in the sensible way (with BLX / BX LR ), any modern core will predict that (assuming the branch predictor isn't turned off, of course). Writing to the PC directly is a little more variable - generally, big cores might predict it but little