gpt4 book ai didi

linux-kernel - ARM linux 内核 head-common.S

转载 作者:行者123 更新时间:2023-12-02 02:21:41 25 4
gpt4 key购买 nike

我看起来很普通.S

在 __mmap_switched:

.long   init_thread_union + THREAD_START_SP @ sp //for stack pointer

THREAD_START_SP 在“thread+info.h”中定义为 THREAD_SIZE(8192) - 8

设置堆栈大小为 8KB(8129) 和负 8 字节。

为什么要减去 8byte?

我怀疑,我认为 DA(之后递减)对吗?

最佳答案

8字节对齐是APCS中的要求。

在 APCS 中,第 5.2.1 章堆栈,

堆栈还必须在公共(public)接口(interface)处符合以下约束:

SP mod 8 = 0。堆栈必须是双字对齐的。

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html

关于linux-kernel - ARM linux 内核 head-common.S,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7874351/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com