mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add further clarity to example package
This commit is contained in:
parent
d2b20422c8
commit
a2c2d14100
6 changed files with 40 additions and 14 deletions
|
@ -1,6 +1,16 @@
|
|||
#include "libc/macros.h"
|
||||
|
||||
MyAsm: .leafprologue
|
||||
/ Example assembly function.
|
||||
/
|
||||
/ @note param agnostic
|
||||
/ @note we love stack frames
|
||||
/ easiest way to do backtraces
|
||||
/ somehow they usually make code faster
|
||||
/ it's convention for keeping stack 16-byte aligned
|
||||
/ cpus still devote much to pushing & popping b/c i386
|
||||
MyAsm: push %rbp
|
||||
mov %rsp,%rbp
|
||||
call MyPrint2
|
||||
.leafepilogue
|
||||
pop %rbp
|
||||
ret
|
||||
.endfn MyAsm,globl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue