diff options
author | Cherry Zhang <cherryyz@google.com> | 2018-11-02 16:51:14 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2018-11-06 20:10:12 +0000 |
commit | 35c05542938416cde6a366505c24568ea5ccd98e (patch) | |
tree | 0a67752f0e773fd8d612f95ab018ae90f2ae7d6c /doc/asm.html | |
parent | 95a4f793c077ab7b13fdb7505b65ff19a97a07f9 (diff) | |
download | go-35c05542938416cde6a366505c24568ea5ccd98e.tar.gz go-35c05542938416cde6a366505c24568ea5ccd98e.zip |
cmd/asm: rename R18 to R18_PLATFORM on ARM64
In ARM64 ABI, R18 is the "platform register", the use of which is
OS specific. The OS could choose to reserve this register. In
practice, it seems fine to use R18 on Linux but not on darwin (iOS).
Rename R18 to R18_PLATFORM to prevent accidental use. There is no
R18 usage within the standard library (besides tests, which are
updated).
Fixes #26110
Change-Id: Icef7b9549e2049db1df307a0180a3c90a12d7a84
Reviewed-on: https://go-review.googlesource.com/c/147218
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'doc/asm.html')
-rw-r--r-- | doc/asm.html | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/asm.html b/doc/asm.html index f2f8fad576..debb1e2fc6 100644 --- a/doc/asm.html +++ b/doc/asm.html @@ -740,6 +740,7 @@ The ARM64 port is in an experimental state. <p> <code>R18</code> is the "platform register", reserved on the Apple platform. +To prevent accidental misuse, the register is named <code>R18_PLATFORM</code>. <code>R27</code> and <code>R28</code> are reserved by the compiler and linker. <code>R29</code> is the frame pointer. <code>R30</code> is the link register. |