其他分享
首页 > 其他分享> > ARM V8 base instruction -- Conditional instructions

ARM V8 base instruction -- Conditional instructions

作者:互联网

/*
 * Conditional instructions
 */
    CMP指令,N,Z,C,V标志

    条件选择指令
        CSEL w1, w1, w2, EQ        # Conditional Select
        CINC X0, X0, LS            # Conditional Increase, 如果小于,则X0=X0+1

    条件设置
        CSET W0, EQ                # Conditional Set, 相等设置为1,不等设置为0

    # 以CSEL为例,它的用法是这样的:

        CSEL <Xd>, <Xn>, <Xm>, <cond>        # 如果条件(cond)满足,就选择(sel)Xn作为Xd,
                                                                       # 否则选择Xm作为Xd。
        CSEL X0, X0, X1, ge                             # 表示的是如果X0>=X1(ge - greater or equal),
                                                                      # 那么X0=X0(保持不变),否则X0=X1。

   

标签:instruction,--,CSEL,Conditional,ge,w1,X0,X1
来源: https://blog.csdn.net/xiaozhiwise/article/details/123182595