incorporate feedback on ARM64 assembly article
ci/woodpecker/push/woodpecker Pipeline was successful Details

main
Ariadne Conill 2023-04-23 13:01:20 -07:00
parent f412e77867
commit 3eb3bd34b1
1 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,14 @@ data, for example `STT_FUNC` and `STT_OBJECT`. There is no equivalence
in Mach-O, and thus the `.type` directive that you would use when writing
assembly for ELF targets is not supported.
### A brief note on Platform ABIs
You will also need to be aware of minor differences between the Darwin
ABI and other platform ABIs. A notable example is that the `x18`
register is reserved by the Darwin ABI and is explicitly zeroed on
context switches in some cases. This register is also reserved on
Android, but not on GNU/Linux or Alpine.
## Apple-specific vector mnemonics
The other main thing to watch out for is Apple's custom mnemonics for
@ -82,7 +90,7 @@ The first macro allows you to deal with the underscore requirement of the
Darwin ABI:
```c
#ifdef __MACH__
#ifdef __APPLE__
# define PROC_NAME(__proc) _ ## __proc
#else
# define PROC_NAME(__proc) __proc