native: document arm64 registers with comments (#11122)

pull/11134/head
pancake 2021-08-10 20:15:32 +02:00 committed by GitHub
parent aceaaa681d
commit 2cfb8fd697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 17 deletions

View File

@ -3,23 +3,37 @@ module native
import v.ast
enum Arm64Register {
x0
x1
x2
x3
x4
x5
x6
x7
x8
x9
x10
x11
x12
x13
x14
x15
x16
x0 // v----
x1 // |
x2 // |
x3 // | parameter and result registers
x4 // |
x5 // |
x6 // |
x7 // ^----
x8 // XR - indirect result location register
x9 // v----
x10 // |
x11 // |
x12 // | caller saved registers
x13 // |
x14 // |
x15 // ^----
x16 // IP0 - inter procedure call scratch register
x17 // IP1 - inter procedure call scratch register
x18 // PR - platform register
x19 // v----
x20 // |
x21 // |
x22 // |
x23 // | callee saved registers
x24 // |
x25 // |
x26 // |
x27 // |
x28 // ^----
x29 // FP - frame pointer
x30 // LR - link register
}
pub struct Arm64 {