Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 9633cc2

Browse files
ZecyelCopilot
andauthored
Update docs/lab/lab2.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5c2c455 commit 9633cc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/lab/lab2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ int recursion(int x){ #求斐波那契数
336336
337337
000000000000122c <recursion(int)>:
338338
push %rbp #保存 rbp
339-
push %rbx #保存 ebx
339+
push %rbx #保存 rbx
340340
mov %edi,%ebx #保存第一个参数x,因为x和rdi寄存器后续函数都要使用,因此将x保存在新的寄存器中(这里是ebx),防止后续的函数将rdi中存放的x覆盖掉,而ebx因为是callee-save,因此提前保存了它
341341
cmp $0x1,%edi
342342
jle 1258 <recursion(int)+0x2c> # 小于等于 1 则跳转,相当于 x < 2

0 commit comments

Comments
 (0)