ARM 到 Thumb 的开关是否会发生流水线停顿? [英] Does a pipeline stall occur on an ARM to Thumb switch?

查看:19
本文介绍了ARM 到 Thumb 的开关是否会发生流水线停顿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 ARM 架构中,如果发生 ARM 到 Thumb 模式的切换,是否会发生流水线停顿?如果是这样,有多少个周期受到影响?这对于 Thumb 到 ARM 模式切换是否相同?这种行为是否因不同的 ARM 处理器而异?

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 ?

推荐答案

不,一点也不.

成本就像任何其他分支指令一样.如果预测器命中,则免费,否则,通常需要花费 13 个周期.

The cost is just like any other branch instruction. If the predictor hits, it's free, if not, it costs the usual 13 cycles.

不会因为切换而产生额外的隐藏问题.

There's no additional hidden hiccups due to the switching.

因此,您可以使用互通模式而不必担心与模式切换相关的潜在惩罚.

Therefore, you can use the interworking mode without worrying about potential penalties related to the mode switching.

这篇关于ARM 到 Thumb 的开关是否会发生流水线停顿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆