-
Notifications
You must be signed in to change notification settings - Fork 17
aarch64memo
tyfkda edited this page Aug 6, 2023
·
14 revisions
-
Reference: Arm Architecture Reference Manual for A-profile architecture
-
Writing ARM64 Code for Apple Platforms | Apple Developer Documentation Mac向け
-
mov dst, src
: dst <- src -
ldr dst, src
: dst <- src -
str src, dst
: src -> dst -
add dst, opr1, opr2
: dst <- opr1 + opr2
-
X0
~X30
-
X31
=SP
orXZR
(Zero register) -
X30
= Procedure link register (Return address) -
X29
= Frame Pointer
Calling convention # ARM(A64) - Wikipedia
Regs. | Purpose |
---|---|
X0 ~X7
|
Function parameters |
X9 ~X15
|
Local variables: (Caller save) |
X19 ~X29
|
Callee save |
X29 |
Frame pointer (FP ) |
X30 |
Procedure link register (LR ) |
X31 |
Stack pointer (SP ) |
- 構造体が格納されているアドレスをレジスタで渡してるっぽい
-
x8
に格納先アドレスを渡してるっぽい
Variaic function parameters: 常にスタック経由で渡される。
Addressing Architectural Differences in Your macOS Code | Apple Developer Documentation
Don’t Redeclare a Function to Have Variable Parameters
... On arm64, the compiler always places variadic parameters on the stack, regardless of whether registers are available.
//