通过分支指令访问条件结构的False部分,这不是最优的方式,但是访问它的可能性不大。
The False portion of the conditional would then be available through the branch instruction, which is less optimal but also less likely.
问题的关键是SPU有几个条件指令,例如selb、shufb和位操作,它们可以不用分支就能实现条件操作。
The key is that the SPU has several conditional instructions, such as selb, shufb, and the bit operations, which allow conditional operations to occur without branching.
例如,如果一个条件标上了“likely”,那么编译器可以把代码的True部分直接放在分支指令后面(这样就不需要执行分支指令)。
For example, if the conditional is marked "likely" then the compiler can place the True portion of the code immediately following the branch (which will not be taken).
本文基于ARM 9tdmi内核,从指令调整、寄存器分配、条件分支和循环结构等方面对汇编代码的优化方法进行了详细的论述。
This article gives a detail discussion on the assembled code optimization from instruction arrangement, register division, condition selection branch and cycle structure based on the core of ARM9TDMI.
如果这仍然超过4K消失,那么你需要找到一个无条件分支或在你的功能,你可以以后把它返回指令。
If that's still more than 4k away then you need to find an unconditional branch or return instruction in your function that you can put it after.
如果这仍然超过4K消失,那么你需要找到一个无条件分支或在你的功能,你可以以后把它返回指令。
If that's still more than 4k away then you need to find an unconditional branch or return instruction in your function that you can put it after.
应用推荐