- 博客(13)
- 资源 (6)
- 收藏
- 关注
原创 Register Usage Conventions
By convention, registers %eax, %edx, and %ecx are classified as caller save registers. When procedureQ is called by P, it can overwrite these registers without destroying any data required
2009-12-28 09:46:00 815
原创 Stack Frame Structure
在IA32的体系结构中,没有专门用来保存函数参数 局部变量的寄存器,而是使用堆栈来实现。 下图显示了,从一个函数调用另一个函数的堆栈变化
2009-12-26 14:40:00 999
原创 Jmp指令的格式
jmp就是跳到另一个地方那个去执行 There are several different encodings for jumps, but some of the most commonly used ones are PC-relative.1. That is, they encode the difference between the address of the targe
2009-12-24 22:21:00 5041
原创 Condition Codes
The most useful condition codes are: CF: Carry Flag. The most recent operation generated a carry out of the most significant bit. Used to detectoverflow for unsigned operations.ZF: Zer
2009-12-23 21:33:00 1554
原创 Arithmetic and Logical Operation
可以看到,这里面没有除法。 不知道别的architecture有没有除法。 Special Arithmetic Operations 这里有除法运算,不过这个除法的话 需要使用到并没有标示出来的寄存器。
2009-12-21 21:00:00 932
原创 Load Effective Address指令的作用
指令 作用 描述leal S,D D 下面看一道习题 所以实际使用中,leal用来做算术运算。 原本 9(%eax, %eac, 2) 表示去%eax+2*%ecx+9 这个地址中的值, 而leal表示去地址,就表示取出这个地址。就变成了计算这个值了。
2009-12-21 20:52:00 1432
原创 利用移位运算 加速乘法
Practice Problem 2.21:As we will see in Chapter 3, the leal instruction on an Intel-compatible processor can perform computationsof the form aThe compiler often uses this instruction to perfor
2009-12-14 15:23:00 1128
原创 关于补码取负数的证明
很早就学到了,补码取负数的运算可以用 取反 加一 来算但一直不知道为什么。 终于找到一个牛逼的证明 A well-known technique for performing two’s complement negation at the bit level is to complement thebits and then increment the result. In C,
2009-12-14 11:46:00 2529
原创 Virtual address space for Linux process
Program code and data. Code begins at the same fixed address, followed by data locations thatcorrespond to global C variables. The code and data areas are initialized directly from the
2009-12-08 20:47:00 3187
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人