·2,447,543篇论文数据,部分数据来源于NoteExpress
之后,是两个加法指令,第一个是普通相加,第二个是带进位相加。
Then comes two add instructions. The first is a normal add and the second one is add with carry.
因此,si_a (a, b)会强制使用a指令做加法运算。
So, si_a (a, b) forces the instruction a to be used for addition.
可以看到test1()中每次加法都需要读取和存储全局变量errs,而在test2()中,localerrs分配在寄存器上,只需要一条指令。
Note that test1 must load and store the global errs value each time it is incremented, whereas test2 stores localerrs in a register and needs only a single instruction.
应用推荐