-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## 操作数指示符 | ||
|
||
|
||
|
||
- 立即数(`immediate`),表示常数值 | ||
|
||
- 寄存器(`register`),**表示某个寄存器的内容** | ||
|
||
- 内存引用,根据计算出来的地址访问某个内存位置 | ||
|
||
寻址模式组成: | ||
|
||
- 立即数偏移`Imm` | ||
- 基址寄存器`rb` | ||
- 变址寄存器`ri` | ||
- 比例因子`s`(s 是`1,2,4,8`). | ||
- 有效地址的计算:`Imm+R[rb]+s*[ri]` | ||
|
||
![image-20230507234057757](https://raw.githubusercontent.com/Jiewyjson/P/main/md/v1/202305072341281.png) | ||
|
||
### 数据传送指令 | ||
|
||
> `MOV`类,使用字符(`b`,`w`,`l`,`q`)来指定数据的大小(字节,字,双字,四字). | ||
> | ||
> `movl` 以寄存器为目的时,会把寄存器的高位四字节设为`0`. | ||
> | ||
> `movabsq` 能以任意64位立即数作为源操作数,并且目的只能是寄存器 | ||
> | ||
> `movz` 把目的中剩余的字节填充为`0`,`movs` 通过符号扩展填充 | ||
> | ||
> `cltq` 只作用与寄存器`%eax` ` %rax`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# cs:app | ||
|
||
[2.信息的表示和处理](./2.信息的表示和处理.md) | ||
[2.信息的表示和处理](./2.信息的表示和处理.md) | ||
|
||
[3.程序的机器级表示](./3.程序的机器级表示.md) |
Empty file.