[go] doc/go1.18: mention register ABI on ARM64 and PPC64

27 views
Skip to first unread message

Cherry Mui (Gerrit)

unread,
Nov 19, 2021, 4:41:40 PM11/19/21
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Jeremy Faller, Austin Clements, golang-co...@googlegroups.com

Cherry Mui submitted this change.

View Change



1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: doc/go1.18.html
Insertions: 6, Deletions: 6.

@@ -29,6 +29,24 @@
TODO: complete this section
</p>

+<h3 id="generics">Generics</h3>
+
+<p>
+Go 1.18 includes an implementation of generics as described
+by <a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md">the
+proposal</a>.
+</p>
+
+<p>
+ The current generics implementation has the following limitations:
+ <ul>
+ <li><!-- issue 47631 -->
+ The Go compiler cannot currently handle type declarations inside generic functions
+ or methods. We hope to provide support for this feature in Go 1.19.
+ </li>
+ </ul>
+</p>
+
<h2 id="ports">Ports</h2>

<h3 id="freebsd">FreeBSD</h3>
@@ -40,6 +58,19 @@
FreeBSD 13.0+ will require a kernel with the COMPAT_FREEBSD12 option set (this is the default).
</p>

+<h3 id="amd64">AMD64</h3>
+
+<p><!-- CL 349595 -->
+ Go 1.18 introduces the new <code>GOAMD64</code> environment variable which selects
+ a version of the AMD64 architecture. Allowed values are <code>v1</code>,
+ <code>v2</code>, <code>v3</code>, or <code>v4</code>. Each higher level requires,
+ and takes advantage of, additional processor features. A detailed description of the
+ versions is <a href="https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels">here</a>.
+</p>
+<p>
+ The <code>GOAMD64</code> environment variable defaults to <code>v1</code>.
+</p>
+
<h3 id="riscv">RISC-V</h3>

<p><!-- golang.org/issue/47100, CL 334872 -->
@@ -117,10 +148,6 @@
third-party tools that need to collect package source code.)
</p>

-<p><!-- CL 349595 -->
- TODO: <a href="https://golang.org/cl/349595">https://golang.org/cl/349595</a>: cmd/go: add GOAMD64 environment variable
-</p>
-
<h3 id="gofmt"><code>gofmt</code></h3>

<p><!-- https://golang.org/issue/43566 -->
@@ -141,12 +168,12 @@
Go 1.17 <a href=go1.17#compiler>implemented</a> a new way of passing
function arguments and results using registers instead of the stack
on 64-bit x86 architecture on selected operating systems.
- In Go 1.18, this is expanded to 64-bit x86, 64-bit ARM, and
- big- and little-endian 64-bit PowerPC architectures
- (<code>GOARCH=amd64</code>, <code>arm64</code>, <code>ppc64</code>,
- and <code>ppc64le</code>) on all operating systems.
- On 64-bit ARM and 64-bit PowerPC systems this will likely improve the
- performance of Go programs by 10% or more.
+ Go 1.18 expands the supported platforms to include 64-bit ARM (<code>GOARCH=arm64</code>),
+ big- and little-endian 64-bit PowerPC (<code>GOARCH=ppc64</code>, <code>ppc64le</code>),
+ as well as 64-bit x86 architecture (<code>GOARCH=amd64</code>)
+ on all operating systems.
+ On 64-bit ARM and 64-bit PowerPC systems, benchmarking shows
+ performance improvements of 10% or more.
</p>

<p>
@@ -222,11 +249,17 @@
<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
<dd>
<p><!-- CL 345569 -->
- TODO: <a href="https://golang.org/cl/345569">https://golang.org/cl/345569</a>: add Writer.AvailableBuffer
+ The new <a href="/pkg/bufio#AvailableBuffer"><code>Writer.AvailableBuffer</code></a>
+ method returns an empty buffer with a possibly non-empty capacity for use
+ with append-like APIs. After appending, the buffer can be provided to a
+ succeeding <code>Write</code> call and possibly avoid any copying.
</p>

<p><!-- CL 345570 -->
- TODO: <a href="https://golang.org/cl/345570">https://golang.org/cl/345570</a>: make Reader.Reset and Writer.Reset work on the zero value
+ The methods <a href="/pkg/bufio#Reader.Reset"><code>Reader.Reset</code></a> and
+ <a href="/pkg/bufio#Writer.Reset"><code>Writer.Reset</code></a>
+ now use the default buffer size when called on objects with a
+ <code>nil</code> buffer.
</p>
</dd>
</dl><!-- bufio -->
@@ -234,7 +267,8 @@
<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
<dd>
<p><!-- CL 332771 -->
- TODO: <a href="https://golang.org/cl/332771">https://golang.org/cl/332771</a>: avoid allocations in Trim/TrimLeft/TrimRight
+ <a href="/pkg/bytes#Trim"><code>bytes.Trim</code></a> and related
+ functions, have had their most common use cases optimized.
</p>

<p><!-- CL 359485 -->
@@ -374,7 +408,8 @@
</p>

<p><!-- CL 332771 -->
- TODO: <a href="https://golang.org/cl/332771">https://golang.org/cl/332771</a>: avoid allocations in Trim/TrimLeft/TrimRight
+ <a href="/pkg/bytes#Trim"><code>strings.Trim</code></a> and related functions
+ functions, have had their most common use cases optimized.
</p>

<p><!-- CL 359485 -->
@@ -445,7 +480,8 @@
<dl id="unicode/utf8"><dt><a href="/pkg/unicode/utf8/">unicode/utf8</a></dt>
<dd>
<p><!-- CL 345571 -->
- TODO: <a href="https://golang.org/cl/345571">https://golang.org/cl/345571</a>: add AppendRune
+ The <a href="/pkg/unicode/utf8/#AppendRune"><code>AppendRune</code></a> function appends the UTF-8 new
+ encoding of a <code>rune</code> to a <code>[]byte</code>.
</p>
</dd>
</dl><!-- unicode/utf8 -->
```

Approvals: Jeremy Faller: Looks good to me, approved Cherry Mui: Trusted
doc/go1.18: mention register ABI on ARM64 and PPC64

For #47694.

Change-Id: Ide378f4a34587027c3d84fed2126c5b9bd8f7287
Reviewed-on: https://go-review.googlesource.com/c/go/+/363694
Trust: Cherry Mui <cher...@google.com>
Reviewed-by: Jeremy Faller <jer...@golang.org>
---
M doc/go1.18.html
1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/doc/go1.18.html b/doc/go1.18.html
index cc5c542..61bb8db 100644
--- a/doc/go1.18.html
+++ b/doc/go1.18.html
@@ -71,12 +71,6 @@
The <code>GOAMD64</code> environment variable defaults to <code>v1</code>.
</p>

-<h3 id="ppc64">PPC64</h3>
-
-<p><!-- CL 353969 -->
- TODO: <a href="https://golang.org/cl/353969">https://golang.org/cl/353969</a>: internal/buildcfg: enable register ABI for PPC64
-</p>
-
<h3 id="riscv">RISC-V</h3>

<p><!-- golang.org/issue/47100, CL 334872 -->
@@ -170,6 +164,25 @@

<h2 id="compiler">Compiler</h2>

+<p><!-- https://golang.org/issue/40724 -->
+ Go 1.17 <a href=go1.17#compiler>implemented</a> a new way of passing
+ function arguments and results using registers instead of the stack
+ on 64-bit x86 architecture on selected operating systems.
+ Go 1.18 expands the supported platforms to include 64-bit ARM (<code>GOARCH=arm64</code>),
+ big- and little-endian 64-bit PowerPC (<code>GOARCH=ppc64</code>, <code>ppc64le</code>),
+ as well as 64-bit x86 architecture (<code>GOARCH=amd64</code>)
+ on all operating systems.
+ On 64-bit ARM and 64-bit PowerPC systems, benchmarking shows
+ performance improvements of 10% or more.
+</p>
+
+<p>
+ As <a href=go1.17#compiler>mentioned</a> in the Go 1.17 release notes,
+ this change does not affect the functionality of any safe Go code and
+ is designed to have no impact on most assembly code. See the
+ <a href=go1.17#compiler>Go 1.17 release notes</a> for more details.
+</p>
+
<p><!-- CL 298611 -->
TODO: <a href="https://golang.org/cl/298611">https://golang.org/cl/298611</a>: cmd/compile: add -asan option
</p>

To view, visit change 363694. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ide378f4a34587027c3d84fed2126c5b9bd8f7287
Gerrit-Change-Number: 363694
Gerrit-PatchSet: 4
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Jeremy Faller <jer...@golang.org>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages