<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/internal/obj, branch dev.link</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/compile,cmd/internal/obj/riscv,runtime: use Duff's devices on riscv64</title>
<updated>2020-10-28T05:02:44+00:00</updated>
<author>
<name>Michał Derkacz</name>
<email>michal@Lnet.pl</email>
</author>
<published>2020-06-13T22:06:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=150d2448e5a213cd679396371c0a147918dc2125'/>
<id>150d2448e5a213cd679396371c0a147918dc2125</id>
<content type='text'>
Implement runtime.duffzero and runtime.duffcopy for riscv64.
Use obj.ADUFFZERO/obj.ADUFFCOPY for medium size, word aligned
zeroing/moving.

Change-Id: I42ec622055630c94cb77e286d8d33dbe7c9f846c
Reviewed-on: https://go-review.googlesource.com/c/go/+/237797
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement runtime.duffzero and runtime.duffcopy for riscv64.
Use obj.ADUFFZERO/obj.ADUFFCOPY for medium size, word aligned
zeroing/moving.

Change-Id: I42ec622055630c94cb77e286d8d33dbe7c9f846c
Reviewed-on: https://go-review.googlesource.com/c/go/+/237797
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/link,cmd/internal/obj/riscv: add TLS support for linux/riscv64</title>
<updated>2020-10-27T04:20:42+00:00</updated>
<author>
<name>Joel Sing</name>
<email>joel@sing.id.au</email>
</author>
<published>2020-05-19T08:55:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=3a63d04d2edcbdb0937d775e852692279f73a2e2'/>
<id>3a63d04d2edcbdb0937d775e852692279f73a2e2</id>
<content type='text'>
Add support for Thread Local Storage (TLS) for linux/riscv64 with external
linking, using the initial-exec model.

Update #36641

Change-Id: I3106ef9a29cde73215830b00deff43dbec1c76e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/263478
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Run-TryBot: Joel Sing &lt;joel@sing.id.au&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for Thread Local Storage (TLS) for linux/riscv64 with external
linking, using the initial-exec model.

Update #36641

Change-Id: I3106ef9a29cde73215830b00deff43dbec1c76e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/263478
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Run-TryBot: Joel Sing &lt;joel@sing.id.au&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/obj/{arm,s390x}: make return jump print nicer</title>
<updated>2020-10-26T19:15:06+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-22T01:29:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=751c37fd629e0ebb18c39a219fab2b224d016b70'/>
<id>751c37fd629e0ebb18c39a219fab2b224d016b70</id>
<content type='text'>
When a function with non-zero frame size makes a return jump
(RET target), it assembles to, conceptually,

MOV (SP), LR
ADD $framesize, SP
JMP target

We did not clear some fields in the first instruction's Prog.To,
causing it printed like (on ARM)

MOVW.P	4(R13), (R14)(R14)(REG)

Clear the fields to make it print nicer.

Change-Id: I180901aeea41f1ff287d7c6034a6d69005927744
Reviewed-on: https://go-review.googlesource.com/c/go/+/264343
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Joel Sing &lt;joel@sing.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a function with non-zero frame size makes a return jump
(RET target), it assembles to, conceptually,

MOV (SP), LR
ADD $framesize, SP
JMP target

We did not clear some fields in the first instruction's Prog.To,
causing it printed like (on ARM)

MOVW.P	4(R13), (R14)(R14)(REG)

Clear the fields to make it print nicer.

Change-Id: I180901aeea41f1ff287d7c6034a6d69005927744
Reviewed-on: https://go-review.googlesource.com/c/go/+/264343
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Joel Sing &lt;joel@sing.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/obj/riscv: support additional register to register moves</title>
<updated>2020-10-24T08:12:11+00:00</updated>
<author>
<name>Joel Sing</name>
<email>joel@sing.id.au</email>
</author>
<published>2020-10-23T16:53:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=4a6782562828779025d1423c9a04bc47ca9c3688'/>
<id>4a6782562828779025d1423c9a04bc47ca9c3688</id>
<content type='text'>
Add support for signed and unsigned register to register moves of various
sizes. This makes it easier to handle zero and sign extension and will allow
for further changes that improve the compiler optimisations for riscv64.

While here, change the existing register to register moves from obj.Prog
rewriting to instruction generation.

Change-Id: Id21911019b76922367a134da13c3449a84a1fb08
Reviewed-on: https://go-review.googlesource.com/c/go/+/264657
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for signed and unsigned register to register moves of various
sizes. This makes it easier to handle zero and sign extension and will allow
for further changes that improve the compiler optimisations for riscv64.

While here, change the existing register to register moves from obj.Prog
rewriting to instruction generation.

Change-Id: Id21911019b76922367a134da13c3449a84a1fb08
Reviewed-on: https://go-review.googlesource.com/c/go/+/264657
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: add //go:embed support</title>
<updated>2020-10-23T00:29:10+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-07-19T04:32:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=8bde9b320e25b2d6edf96fa5e694046fea0c04c8'/>
<id>8bde9b320e25b2d6edf96fa5e694046fea0c04c8</id>
<content type='text'>
This commit contains the compiler support for //go:embed lines.
The go command passes to the compiler an "embed config"
that maps literal patterns like *.txt to the set of files to embed.
The compiler then lays out the content of those files as static data
in the form of an embed.Files or string or []byte in the final object file.

The test for this code is the end-to-end test hooking up the
embed, cmd/compile, and cmd/go changes, in the next CL.

For #41191.

Change-Id: I916e57f8cc65871dc0044c13d3f90c252a3fe1bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/243944
Trust: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit contains the compiler support for //go:embed lines.
The go command passes to the compiler an "embed config"
that maps literal patterns like *.txt to the set of files to embed.
The compiler then lays out the content of those files as static data
in the form of an embed.Files or string or []byte in the final object file.

The test for this code is the end-to-end test hooking up the
embed, cmd/compile, and cmd/go changes, in the next CL.

For #41191.

Change-Id: I916e57f8cc65871dc0044c13d3f90c252a3fe1bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/243944
Trust: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/obj: use correct symbol size for Hashed64 classification</title>
<updated>2020-10-22T18:16:29+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-22T14:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=2ad44158af373f68c1aef528738a5baade77d316'/>
<id>2ad44158af373f68c1aef528738a5baade77d316</id>
<content type='text'>
Use sym.Size, instead of len(sym.P), to decide whether a
content-addressable symbol is "short" and hashed as Hashed64.
So we don't dedup a small symbol with a gigantic almost-zero
symbol.

Fixes #42140.

Change-Id: Ic65869e1eaf51947517b3ece49c8b0be1b94bb75
Reviewed-on: https://go-review.googlesource.com/c/go/+/264337
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use sym.Size, instead of len(sym.P), to decide whether a
content-addressable symbol is "short" and hashed as Hashed64.
So we don't dedup a small symbol with a gigantic almost-zero
symbol.

Fixes #42140.

Change-Id: Ic65869e1eaf51947517b3ece49c8b0be1b94bb75
Reviewed-on: https://go-review.googlesource.com/c/go/+/264337
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile,cmd/internal/obj/riscv: move g register on riscv64</title>
<updated>2020-10-21T16:40:47+00:00</updated>
<author>
<name>Joel Sing</name>
<email>joel@sing.id.au</email>
</author>
<published>2020-05-19T08:55:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=6f45b39e4dbabf0b179a60ffacf434e55b2d5eab'/>
<id>6f45b39e4dbabf0b179a60ffacf434e55b2d5eab</id>
<content type='text'>
The original riscv64 port used the thread pointer (TP aka X4) register for
the g pointer, however this register is also used when TLS support is
required, resulting in a conflict (for example, when a signal is received
we have no way of readily knowing if X4 contains a pointer to the TCB or
a pointer to a g).

In order to support cgo, free up the X4 register by moving g to X27.
This unfortunately means that the X4 register is unused in non-cgo mode,
however the alternative is to not support cgo on this platform.

Update #36641

Change-Id: Idcaf3e8ccbe42972a1b8943aeefde7149d9c960a
Reviewed-on: https://go-review.googlesource.com/c/go/+/263477
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original riscv64 port used the thread pointer (TP aka X4) register for
the g pointer, however this register is also used when TLS support is
required, resulting in a conflict (for example, when a signal is received
we have no way of readily knowing if X4 contains a pointer to the TCB or
a pointer to a g).

In order to support cgo, free up the X4 register by moving g to X27.
This unfortunately means that the X4 register is unused in non-cgo mode,
however the alternative is to not support cgo on this platform.

Update #36641

Change-Id: Idcaf3e8ccbe42972a1b8943aeefde7149d9c960a
Reviewed-on: https://go-review.googlesource.com/c/go/+/263477
Trust: Joel Sing &lt;joel@sing.id.au&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/obj: reject too large symbols</title>
<updated>2020-10-20T18:51:03+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-19T14:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=c9c64886ef041b096d7f93c4e7d2ef5faf87ad43'/>
<id>c9c64886ef041b096d7f93c4e7d2ef5faf87ad43</id>
<content type='text'>
We never supported symbol larger than 2GB (issue #9862), so the
object file uses 32-bit for symbol sizes. Check and reject too
large symbol before truncating its size.

Fixes #42054.

Change-Id: I0d1d585ebdba9556f2fd3a97043bd4296d5cc9e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/263641
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We never supported symbol larger than 2GB (issue #9862), so the
object file uses 32-bit for symbol sizes. Check and reject too
large symbol before truncating its size.

Fixes #42054.

Change-Id: I0d1d585ebdba9556f2fd3a97043bd4296d5cc9e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/263641
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/asm: allow def/ref of func ABI when compiling runtime</title>
<updated>2020-10-19T11:25:35+00:00</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2020-10-07T16:31:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=dd58239dd20f7002b3e219a477514b91dd0cc5fc'/>
<id>dd58239dd20f7002b3e219a477514b91dd0cc5fc</id>
<content type='text'>
Function symbols defined and referenced by assembly source currently
always default to ABI0; this patch adds preliminary support for
accepting an explicit ABI selector clause for func defs/refs. This
functionality is currently only enabled when compiling runtime-related
packages (runtime, syscall, reflect). Examples:

  TEXT ·DefinedAbi0Symbol&lt;ABI0&gt;(SB),NOSPLIT,$0
        RET

  TEXT ·DefinedAbi1Symbol&lt;ABIInternal&gt;(SB),NOSPLIT,$0
        CALL    ·AbiZerolSym&lt;ABI0&gt;(SB)
	...
        JMP     ·AbiInternalSym&lt;ABIInternal&gt;(SB)
        RET

Also included is a small change to the code in the compiler that reads
the symabis file emitted by the assembler.

New behavior is currently gated under GOEXPERIMENT=regabi.

Updates #27539, #40724.

Change-Id: Ia22221fe26df0fa002191cfb13bdfaaa38d7df38
Reviewed-on: https://go-review.googlesource.com/c/go/+/260477
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Than McIntosh &lt;thanm@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function symbols defined and referenced by assembly source currently
always default to ABI0; this patch adds preliminary support for
accepting an explicit ABI selector clause for func defs/refs. This
functionality is currently only enabled when compiling runtime-related
packages (runtime, syscall, reflect). Examples:

  TEXT ·DefinedAbi0Symbol&lt;ABI0&gt;(SB),NOSPLIT,$0
        RET

  TEXT ·DefinedAbi1Symbol&lt;ABIInternal&gt;(SB),NOSPLIT,$0
        CALL    ·AbiZerolSym&lt;ABI0&gt;(SB)
	...
        JMP     ·AbiInternalSym&lt;ABIInternal&gt;(SB)
        RET

Also included is a small change to the code in the compiler that reads
the symabis file emitted by the assembler.

New behavior is currently gated under GOEXPERIMENT=regabi.

Updates #27539, #40724.

Change-Id: Ia22221fe26df0fa002191cfb13bdfaaa38d7df38
Reviewed-on: https://go-review.googlesource.com/c/go/+/260477
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Trust: Than McIntosh &lt;thanm@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/obj/ppc64,cmd/asm/internal/asm/testdata: fix up ppc64 testcases</title>
<updated>2020-10-16T12:48:42+00:00</updated>
<author>
<name>Lynn Boger</name>
<email>laboger@linux.vnet.ibm.com</email>
</author>
<published>2020-10-06T21:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=e981936855383883edb5fcc85a196c485b15f0f9'/>
<id>e981936855383883edb5fcc85a196c485b15f0f9</id>
<content type='text'>
When a fix was made at the end of the last release related to
NOPs, it was discovered that the ppc64.s testcase was out of date
and contained comments that weren't being processed. Essentially the
instructions in that test were being assembled but there was no
verification that the encodings weres correct. The ppc64enc.s file
was mostly complete and included the valid encodings for verification.
This change moves ppc64enc.s to ppc64.s and adds the instructions
that were missing.

This also adds a minor fix to asm9.go on the assembly of the
addex that was discovered during this testing.

Change-Id: Iaada1563b137849ad195fa88f32ecc9ab3e1e95f
Reviewed-on: https://go-review.googlesource.com/c/go/+/260217
Run-TryBot: Lynn Boger &lt;laboger@linux.vnet.ibm.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
Trust: Lynn Boger &lt;laboger@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a fix was made at the end of the last release related to
NOPs, it was discovered that the ppc64.s testcase was out of date
and contained comments that weren't being processed. Essentially the
instructions in that test were being assembled but there was no
verification that the encodings weres correct. The ppc64enc.s file
was mostly complete and included the valid encodings for verification.
This change moves ppc64enc.s to ppc64.s and adds the instructions
that were missing.

This also adds a minor fix to asm9.go on the assembly of the
addex that was discovered during this testing.

Change-Id: Iaada1563b137849ad195fa88f32ecc9ab3e1e95f
Reviewed-on: https://go-review.googlesource.com/c/go/+/260217
Run-TryBot: Lynn Boger &lt;laboger@linux.vnet.ibm.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
Trust: Lynn Boger &lt;laboger@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
