incorporate feedback on ARM64 assembly article
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
f412e77867
commit
3eb3bd34b1
|
@ -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
|
in Mach-O, and thus the `.type` directive that you would use when writing
|
||||||
assembly for ELF targets is not supported.
|
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
|
## Apple-specific vector mnemonics
|
||||||
|
|
||||||
The other main thing to watch out for is Apple's custom mnemonics for
|
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:
|
Darwin ABI:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#ifdef __MACH__
|
#ifdef __APPLE__
|
||||||
# define PROC_NAME(__proc) _ ## __proc
|
# define PROC_NAME(__proc) _ ## __proc
|
||||||
#else
|
#else
|
||||||
# define PROC_NAME(__proc) __proc
|
# define PROC_NAME(__proc) __proc
|
||||||
|
|
Loading…
Reference in New Issue