.set push and .set pop

来源:互联网 发布:掌上阅读软件下载 编辑:程序博客网 时间:2024/06/05 07:46
在龙芯论坛搜到的。
.set <flag>
Sets (and clears) various flags that affect generated code. The following table may not be a complete list.
Flag
noreorder
        Turns off reordering of instructions. When on, t.i. when the assembler is reordering, it will put the last instruction before j or jr after the jump so it'll be in the branch delay slot. When off, you'll have to do it yourself.

mips3
        Tells the assembler that it can use the MIPS III instructions. Withouth it as simulates 64 bit instructions, and believe me, that's something you don't want.

reorder
        Allows the assembler to reorder instructions; see noreorder

pop
        Not really a flag but restores the state of the flags to what it was before the last .set push; see push.

push
        Nor really a flag but saves the status of the flags so it can be restored with .set pop. Not really useful (I think) outside inline assembly. Use in pairs with .set pop.
原创粉丝点击