**SA0, bit [4]**
SP Alignment check enable for EL0. When set to 1, if a load or store
instruction executed at EL0 uses the SP as the base address and the SP is not
aligned to a 16-byte boundary, then a SP alignment fault exception is
generated. For more information, see SP alignment checking on page D1-2333.
When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is
{1, 1}, this bit has no effect on execution at EL0.
In a system where the PE resets into EL1, this field resets to an
architecturally UNKNOWN value.
**SA, bit [3]**
SP Alignment check enable. When set to 1, if a load or store instruction
executed at EL1 uses the SP as the base address and the SP is not aligned to
a 16-byte boundary, then a SP alignment fault exception is generated. For
more information, see SP alignment checking on page D1-2333.
When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is
{1, 1}, this bit has no effect on the PE.
In a system where the PE resets into EL1, this field resets to an
architecturally UNKNOWN value.
1条答案
按热度按时间xytpbqjk1#
堆栈是向上增长还是向下增长完全取决于您正在查看的系统的ABI。也就是说,我必须处理的所有arm 64代码都有向下增长的堆栈。
有了这个,一个常见的推动看起来像这样:
字符串
像这样的流行音乐:
型
很明显,这会一次压入/弹出两个寄存器,从而一次修改堆栈指针16个字节,这将我们带到下一部分:
堆栈对齐检查。堆栈指针是否必须与16字节边界对齐 * 也 * 取决于您正在使用的ABI,但这是一个可以配置的实际硬件功能。参见the ARMv8 Reference Manual,
SCTLR_EL[123]
包括为每个异常级别打开或关闭此功能的位。引用SCTLR_EL1
,例如:型