Skip to content

Commit 0271cc4

Browse files
committed
Document callee-saved registers.
1 parent 4d65c99 commit 0271cc4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

www/notes/a86.scrbl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,11 @@ There are 16 registers: @racket['rax], @racket['rbx], @racket['rcx],
686686
@racket['eax] which accesses the lower 32-bits of @racket['rax].
687687
This is useful in case you need to read or write 32-bits of memory.
688688

689+
The registers @racket['rbx], @racket['rsp], @racket['rbp], and
690+
@racket['r12] through @racket['r15] are ``callee-saved'' registers,
691+
meaning they are preserved across function calls (and must be saved
692+
and restored by any callee code).
693+
689694
Each register plays the same role as in x86, so for example
690695
@racket['rsp] holds the current location of the stack.
691696

0 commit comments

Comments
 (0)