mv cmd/new5l cmd/5l and so on.
Minimal changes to cmd/dist and cmd/go to keep things building.
More can be deleted in followup CLs.
Change-Id: I1449eca7654ce2580d1f413a56dc4a75f3d4618b
Reviewed-on: https://go-review.googlesource.com/6361
Reviewed-by: Rob Pike <r@golang.org>
Today it's only recorded for C, but the Go version of the linker will need it.
Change-Id: I0de56d98e8f3f1b7feb830458c0934af367fd29a
Reviewed-on: https://go-review.googlesource.com/6333
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
In the tests, the runtime test fails after 2 minutes.
On an unloaded VM it only takes 45 seconds.
I think the difference is all the other build work going on
simultaneously with the running of the runtime test.
Change-Id: I41e95d2e4daea44ceaa8505f81aa7b5bcfa9ec77
Reviewed-on: https://go-review.googlesource.com/6364
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
We used to not call traceback from goexit1.
But now tracer does it and crashes on amd64p32:
runtime: unexpected return pc for runtime.getg called from 0x108a4240
goroutine 18 [runnable, locked to thread]:
runtime.traceGoEnd()
src/runtime/trace.go:758 fp=0x10818fe0 sp=0x10818fdc
runtime.goexit1()
src/runtime/proc1.go:1540 +0x20 fp=0x10818fe8 sp=0x10818fe0
runtime.getg(0x0)
src/runtime/asm_386.s:2414 fp=0x10818fec sp=0x10818fe8
created by runtime/pprof_test.TestTraceStress
src/runtime/pprof/trace_test.go:123 +0x500
Return PC from goexit1 points right after goexit (+0x6).
It happens to work most of the time somehow.
This change fixes traceback from goexit1 by adding an additional NOP to goexit.
Fixes#9931
Change-Id: Ied25240a181b0a2d7bc98127b3ed9068e9a1a13e
Reviewed-on: https://go-review.googlesource.com/5460
Reviewed-by: Russ Cox <rsc@golang.org>
This is to be used by an lldb script inside go_darwin_arm_exec to pause
the execution of tests on iOS so the working directory can be adjusted
into something resembling a GOROOT.
Change-Id: I69ea2d4d871800ae56634b23ffa48583559ddbc6
Reviewed-on: https://go-review.googlesource.com/6363
Reviewed-by: Minux Ma <minux@golang.org>
Grayscale PNG and JPEG images are not uncommon. We should have a fast path.
Also add a benchmark for the recently added CMYK fast path.
benchmark old ns/op new ns/op delta
BenchmarkGray 13960348 324152 -97.68%
Change-Id: I72b5838c8c3d1f2d0a4536a848e020e80b10c0f7
Reviewed-on: https://go-review.googlesource.com/6237
Reviewed-by: Rob Pike <r@golang.org>
This is a follow-up to CL 6265. No behavior changes.
The diff was generated with eg, using template:
package p
import "fmt"
func before(a string) string { return fmt.Sprintf(a) }
func after(a string) string { return a }
Change-Id: I7b3bebf31be5cd1ae2233da06cb4502a3d73f092
Reviewed-on: https://go-review.googlesource.com/6269
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Having this test fail, as it does reliably for me,
makes working frustrating. Disable it for now,
until we can diagnose the issue.
Update issue #8859.
Change-Id: I9dda30d60793e7a51f48f445c78ccb158068cc25
Reviewed-on: https://go-review.googlesource.com/6381
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
ARM operands for MOVM have lists of registers: [R1,R2,R5-R8].
Handle them cleanly.
It was TYPE_CONST with special handling, which meant operand printing
didn't work right and the special handling was ugly. Add a new TYPE_REGLIST
for this case and it all gets cleaner.
Change-Id: I4a64f70fb9765e63cb636619a7a8553611bfe970
Reviewed-on: https://go-review.googlesource.com/6300
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
On Plan 9, the pwd is apparently per-thread not per process. That
means different goroutines saw different current directories, even
changing within a goroutine as they were scheduled.
Instead, track the the process-wide pwd protected by a mutex in the
syscall package and set the current goroutine thread's pwd to the
correct once at critical points.
Fixes#9428
Change-Id: I928e90886355be4a95c2be834f5883e2b50fc0cf
Reviewed-on: https://go-review.googlesource.com/6350
Reviewed-by: David du Colombier <0intro@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This reverts commit 87a0d395c3.
Looks like introducing file_darwin_arm.go is confusing something in the API checker (probably go/types) into ignoring file.go, so the O_SYNC symbol is being lost.
No actual bug in this CL AFAIK, but I'll fix the other bug later and then roll this forward.
Change-Id: Ic132fb101e4b5f2716f7a0d15872bf35bdf42139
Reviewed-on: https://go-review.googlesource.com/6331
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Tests that fork are skipped. Tests that create files do so in a
temporary directory, as the initial PWD is read-only. And
darwin/arm returns a strange mkdir error when trying to write to /.
Change-Id: I2de661a85524300bbac226693d72142992dc188d
Reviewed-on: https://go-review.googlesource.com/6312
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
An artifact of the c2go translation was
a handful of instances of code like:
var s string
s += "foo"
return s
This CL converts those to simply 'return "foo"'.
The conversion was done mechanically with the
quick-and-dirty cleanup script at
https://gist.github.com/josharian/1fa4408044c163983e62.
I then manually moved a couple of comments in fmt.go.
toolstash -cmp thinks that there are no functional changes.
Change-Id: Ic0ebdd10f0fb8de0360a1041ce5cd10ae1168be9
Reviewed-on: https://go-review.googlesource.com/6265
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Not only carrying invalid info but also this caused Error to crash with
null pointer exception.
Change-Id: Ibfe63d20eb9b9178ea618e59c74111e9245a6779
Reviewed-on: https://go-review.googlesource.com/6270
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
These 8 registers are windows into the CR register. They are officially CR0
through CR7 and that is what the assembler accepts, but for some reason
they have always printed as C0 through C7. Fix the naming and printing.
Change-Id: I55822c0322c29d3e01a1f2776b3b210ebf9ded21
Reviewed-on: https://go-review.googlesource.com/6290
Reviewed-by: Russ Cox <rsc@golang.org>
When a function had no body, Yyerror was called with an extra
argument, leading to extraneous printouts.
Add the missing verb to the Yyerror call and display the name of the
bodiless function.
Fixes#10030
Change-Id: I76d76c4547fb9cad1782cb11f7a5c63065a6e0c5
Reviewed-on: https://go-review.googlesource.com/6263
Reviewed-by: Rob Pike <r@golang.org>
Change-Id: I9b08b74214e5a41a7e98866a993b038030a4c073
Reviewed-on: https://go-review.googlesource.com/6251
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Previously, the typeDead check in greyobject was under a separate
!useCheckmark conditional. Put it with the rest of the !useCheckmark
code. Also move a comment about atomic update of the marked bit to
where we actually do that update now.
Change-Id: Ief5f16401a25739ad57d959607b8d81ffe0bc211
Reviewed-on: https://go-review.googlesource.com/6271
Reviewed-by: Rick Hudson <rlh@golang.org>
Change-Id: I8b18dc840425b72d7172a35cb0ba004bd156492d
Reviewed-on: https://go-review.googlesource.com/6252
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I1d1eb71014381452d1ef368431cb2556245a35ab
Reviewed-on: https://go-review.googlesource.com/6250
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The timeouts were increased in CL 2462 and CL 2510
to work around a slowness issue when running Go
programs on a Plan 9 machine on GCE.
Since we figured out this issue, we can restore
the timeouts to their original values.
Updates #10028.
Change-Id: I2e5b91666461715df69df97ea791f3d88d9de4d0
Reviewed-on: https://go-review.googlesource.com/6261
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Clean up the obj API by making Rconv (register pretty printer) a top-level
function. This means that Dconv (operand pretty printer) doesn't need
an Rconv argument.
To do this, we make the register numbers, which are arbitrary inside an
operand (obj.Addr), disjoint sets for each architecture. Each architecture
registers (ha) a piece of the space and then the global Rconv knows which
architecture-specific printer to use.
Clean up all the code that uses Dconv.
Now register numbers are large, so a couple of fields in Addr need to go
from int8 to int16 because they sometimes hold register numbers. Clean
up their uses, which meant regenerating the yacc grammars for the
assemblers. There are changes in this CL triggered by earlier changes
to yacc, which had not been run in this directory.
There is still cleanup to do in Addr, but we're getting closer to that being
easy to do.
Change-Id: I9290ebee013b62f7d24e886743ea5a6b232990ab
Reviewed-on: https://go-review.googlesource.com/6220
Reviewed-by: Russ Cox <rsc@golang.org>
Change-Id: I1bb0b8b11e8c7686b85657050fd7cf926afe4d29
Reviewed-on: https://go-review.googlesource.com/6200
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Updates #9974
This proposal tackles the body of syscalls which have been replaced,
and are now deprecated in linux. This is needed for the arm64 port as
arm64 is the first linux architecture to remove the "legacy" forms of
these syscalls.
The *AT variants were added in kernel 2.6.16, so well before our 2.6.23
cutoff (hey, it'll even work on RHEL5).
Discussion: https://groups.google.com/forum/#!topic/golang-dev/zpeFtN2z5Fc
Change-Id: I473a7c9a295d6f776fcdc75dcce06cbe9e3564ee
Reviewed-on: https://go-review.googlesource.com/5837
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change-Id: I44f1240a766f20de5997faca4f13f96af6da3534
Reviewed-on: https://go-review.googlesource.com/6190
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I2fc3cf94b465bf9d7ff8d7bf935b45e334b401e3
Reviewed-on: https://go-review.googlesource.com/6180
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
It was just missing, and apparently always was.
Change-Id: I84c057bb0ec72940201075f3e6078262fe4bce05
Reviewed-on: https://go-review.googlesource.com/6120
Reviewed-by: Russ Cox <rsc@golang.org>
Previously, the memory allocator on Plan 9 did
not free memory properly. It was only able to
free the last allocated block.
This change implements a variant of the
Kernighan & Ritchie memory allocator with
coalescing and splitting.
The most notable differences are:
- no header is prefixing the allocated blocks, since
the size is always specified when calling sysFree,
- the free list is nil-terminated instead of circular.
Fixes#9736.
Fixes#9803.
Fixes#9952.
Change-Id: I00d533714e4144a0012f69820d31cbb0253031a3
Reviewed-on: https://go-review.googlesource.com/5524
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Disable the test properly on nacl systems, tested on nacl/amd64p32.
Change-Id: Iffe210be4f9c426bfc47f2dd3a8f0c6b5a398cc3
Reviewed-on: https://go-review.googlesource.com/6093
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Update #9993
If the physical page size of the machine is larger than the logical
heap size, for example 8k logical, 64k physical, then madvise(2) will
round up the requested amount to a 64k boundary and may discard pages
close to the page being madvised.
This patch disables the scavenger in these situations, which at the moment
is only ppc64 and ppc64le systems. NaCl also uses a 64k page size, but
it's not clear if it is affected by this problem.
Change-Id: Ib897f8d3df5bd915ddc0b510f2fd90a30ef329ca
Reviewed-on: https://go-review.googlesource.com/6091
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit creates the mime/quotedprintable package. It moves and
exports the QP reader of mime/internal/quotedprintable.
The code is almost unchanged to preserve the commit history.
Updates #4943
Change-Id: I4b7b5a2a40a4c84346d42e4cdd2c11a91b28f9e3
Reviewed-on: https://go-review.googlesource.com/5940
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Liblink is still needed for the linker (for a bit longer) but mostly not.
Delete the unused parts.
Change-Id: Ie63a7c1520dee52b17425b384943cd16262d36e3
Reviewed-on: https://go-review.googlesource.com/6110
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Inlining refuses to inline bodies containing an actual function call, so that
if that call or a child uses runtime.Caller it cannot observe
the inlining.
However, inlining was also refusing to inline bodies that contained
function calls that were themselves inlined away. For example:
func f() int {
return f1()
}
func f1() int {
return f2()
}
func f2() int {
return 2
}
The f2 call in f1 would be inlined, but the f1 call in f would not,
because f1's call to f2 blocked the inlining, despite itself eventually
being inlined away.
Account properly for this kind of transitive inlining and enable.
Also bump the inlining budget a bit, so that the runtime's
heapBits.next is inlined.
This reduces the time for '6g *.go' in html/template by around 12% (!).
(For what it's worth, closing Chrome reduces the time by about 17%.)
Change-Id: If1aa673bf3e583082dcfb5f223e67355c984bfc1
Reviewed-on: https://go-review.googlesource.com/5952
Reviewed-by: Austin Clements <austin@google.com>
MinPrec returns the minimum precision required to represent a Float
without loss of precision. Added test.
Change-Id: I466c8e492dcdd59fae854fc4e71ef9b1add7d817
Reviewed-on: https://go-review.googlesource.com/6010
Reviewed-by: Alan Donovan <adonovan@google.com>
There is only one process under the iOS sandboxd.
Change-Id: I21b5528366a0248a034801a717f24c60f0733c5f
Reviewed-on: https://go-review.googlesource.com/6101
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>