Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto Sync] Sync with ZH repo 22-09-2024 #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ The `instruction name' is used only as a comment in the code and does not partic

In addition, the macros `INSTPAT_START` and `INSTPAT_END` are defined in `nemu/include/cpu/decode.h`. `INSTPAT` uses two other macros, `INSTPAT_INST` and `INSTPAT_MATCH`, which are defined in `nemu/src/isa/$ISA/inst.c`. After expanding the above code with macros and simply organizing the code, you will end up with.
```c
{ const void ** __instpat_end = &&__instpat_end_;
{ const void * __instpat_end = &&__instpat_end_;
do {
uint64_t key, mask, shift;
pattern_decode("??????? ????? ????? ??? ????? 00101 11", 38, &key, &mask, &shift);
Expand Down
2 changes: 1 addition & 1 deletion linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ gcc hello.c -o hello
```
./hello
```
就能够运行改程序.
就能够运行该程序.
命令中的`./`是不能少的, 点代表了当前目录, 而`./hello`则表示当前目录下的`hello`文件.
与Windows不同, Linux系统默认情况下并不查找当前目录,
这是因为Linux下有大量的标准工具(如`test`等), 很容易与用户自己编写的程序重名, 不搜索当前目录消除了命令访问的歧义.
Expand Down