1
0
mirror of https://github.com/golang/go synced 2024-10-04 12:31:21 -06:00
Commit Graph

19937 Commits

Author SHA1 Message Date
Shenghou Ma
6e02e1cfc2 [dev.power64] cmd/ld: update for power64
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121380043
2014-08-07 18:36:42 -04:00
Shenghou Ma
95e8a3a1da [dev.power64] cmd/9c: fix switch bug
The cmd/cc bundled with 9c has additional code compared to our cmd/cc, and
without those code, 9c couldn't handle switch statement where the expression
is not just a simple int32 or int64 variable (e.g. g->status or int8 variable).

All credit goes to rsc.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125840043
2014-08-07 18:34:25 -04:00
Shenghou Ma
4be75c8f26 [dev.power64] include/link.h, liblink: convert 9l functions to liblink
This replaces CL 122990043.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123010043
2014-08-07 15:13:25 -04:00
Shenghou Ma
7c33e5078f [dev.power64] cmd/9l: update header files for liblink
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128720044
2014-08-07 14:56:59 -04:00
Shenghou Ma
bcf7f61f83 [dev.power64] cmd/9a: use liblink, add required additional instructions.
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127730043
2014-08-07 14:49:41 -04:00
Shenghou Ma
fcb842c645 [dev.power64] .hgignore: update for the 9 toolchain
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/124840043
2014-08-07 14:37:00 -04:00
Shenghou Ma
83f6aadf16 [dev.power64] cmd/9c: use liblink, use Go argument passing rules, support both endians
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/126800043
2014-08-07 14:36:34 -04:00
Shenghou Ma
2358603f0c [dev.power64] liblink: move span and asmout related function from obj9.c to asm9.c
To reduce delta for the upcoming liblink CL.
Just code movement, no semantic changes.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124830043
2014-08-07 12:02:36 -04:00
Shenghou Ma
c689eb9b21 [dev.power64] cmd/dist: power64/power64le support.
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/117670045
2014-08-06 23:59:14 -04:00
Shenghou Ma
7582ecc996 [dev.power64] cmd/9g: add doc.go to prevent build failures.
After CL 117670045, cmd/dist will expect to have a cmd/9g directory.

LGTM=rsc, dave
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/126780043
2014-08-06 23:43:36 -04:00
Shenghou Ma
117b1d4685 [dev.power64] cmd/9a, cmd/9c, cmd/9l, liblink: import code from Vita Nuova.
No modifications other than adding copyright header to each file, and
concatenating several cmd/9l files together to form the liblink files.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123840043
2014-08-06 23:41:29 -04:00
Shenghou Ma
9512e470e1 [dev.power64] cmd/dist: recognize power64 and power64le as GOHOSTARCH
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125760043
2014-08-06 16:16:28 -04:00
Russ Cox
ffb07c0e6c [dev.power64] all: merge default, for codereview update
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124820043
2014-08-06 16:15:22 -04:00
Russ Cox
2185dbcd85 codereview: do not hit upload_complete on first patch
Causes server 500 error, so don't do it.

TBR=minux
CC=golang-codereviews
https://golang.org/cl/125770043
2014-08-06 16:12:24 -04:00
Russ Cox
4cc8be60e9 codereview: fix submit of merge + include branch prefix in submitted message
hg insists that we not list explicit files for a merge.

for benefit of other tools reading logs, include branch prefix
at start of every commit message.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124780044
2014-08-06 16:10:08 -04:00
Russ Cox
7aa3031eba cmd/gc: make liveness ~10x faster
1) The arrayindexof lookup function is O(n). Replace with O(1) lookups.

2) The checkptxt function is O(n²) and is purely for debugging.
Only run when the debugging flags are turned on.

3) Iterating over sparse bitmaps can be done faster word by word.
Introduce and use bvnext for that.

Run times before and after, on my 2.5 GHz Core i5 MacBook Pro.

x.go       9.48  0.84  issue 8259

x100.go    0.01  0.01  issue 8354
x1000.go   0.10  0.10
x2000.go   0.62  0.19
x3000.go   1.33  0.34
x4000.go   2.29  0.49
x5000.go   3.89  0.67
x6000.go   5.00  0.90
x7000.go   6.70  1.13
x8000.go   9.44  1.38
x9000.go  11.23  1.87
x10000.go 13.78  2.09

Fixes #8259.
Fixes #8354.

LGTM=iant, r
R=golang-codereviews, iant, r
CC=golang-codereviews
https://golang.org/cl/125720043
2014-08-06 15:46:33 -04:00
Russ Cox
245ed93c20 all: merge default, for codereview fixes
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124810043
2014-08-06 15:36:24 -04:00
Russ Cox
c1fcdb0e00 codereview: handle upload of merge
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/118690043
2014-08-06 15:25:17 -04:00
Russ Cox
6ff5c317eb codereview: preserve branch prefix in subject during hg mail
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124800043
2014-08-06 15:15:45 -04:00
Russ Cox
bd69b4479a cmd/dist: generate anames9.c
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/120690043
2014-08-06 15:12:08 -04:00
Derek Parker
c0ccf6f314 debug/dwarf: fix Reader panic on DW_TAG_unspecified_type
The linker currently produces the DWARF 3 DW_TAG_unspecified_type tag, however the Reader in debug/dwarf will panic whenever that tag is encountered.

Fixes #8437.

LGTM=rsc
R=golang-codereviews, bradfitz, iant, rsc
CC=golang-codereviews
https://golang.org/cl/117280043
2014-08-06 12:11:37 -07:00
Brad Fitzpatrick
059f93be8a A+C: Derek Parker (individual CLA)
Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/125750043
2014-08-06 12:10:00 -07:00
Russ Cox
ccd880f290 cmd/dist, go/build: add power64, power64le to known GOARCH lists
LGTM=dave, minux, aram
R=minux, dave, bradfitz, aram
CC=golang-codereviews
https://golang.org/cl/119470043
2014-08-06 14:58:17 -04:00
Russ Cox
8ad746d226 [dev.power64] remove dummy file 2014-08-06 14:57:34 -04:00
Russ Cox
dc2bb6d061 [dev.power64] create dev branch 2014-08-06 14:56:58 -04:00
Russ Cox
69c2e2b9e0 codereview: enable work and code reviews in development branches
This is an experiment. See mail on golang-dev
(subject: "an experiment: development branches").

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/117660043
2014-08-06 14:52:12 -04:00
Russ Cox
e5e547c71f runtime: turn off 'unexpected return pc' print on arm traceback
It can happen legitimately if a profiling signal arrives at just the wrong moment.
It's harmless.

Fixes #8153.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews, iant, r
https://golang.org/cl/118670043
2014-08-06 14:50:09 -04:00
Percy Wegmann
14e8885c32 crypto/tls: Added dynamic alternative to NameToCertificate map for SNI
Revised version of https://golang.org/cl/81260045/

LGTM=agl
R=golang-codereviews, gobot, agl, ox
CC=golang-codereviews
https://golang.org/cl/107400043
2014-08-06 11:22:00 -07:00
Matthew Dempsky
2b9f3fcead cmd/cgo: consistently map void* to *byte under -{c,go}defs
Fixes #8478.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/122150043
2014-08-06 10:28:19 -07:00
Dmitriy Vyukov
7dfcebbd2d runtime: remove unused variable
Left over from cl/119490044.

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/125730043
2014-08-06 19:33:15 +04:00
Dmitriy Vyukov
f3dd6df6b1 runtime: simplify code
Full spans can't be passed to UncacheSpan since we get rid of free.

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://golang.org/cl/119490044
2014-08-06 18:36:48 +04:00
David du Colombier
de1ab89f03 dist: fix Plan 9 build
Since CL 115060044, mkanames declares an empty
array in anames8.c and anames6.c, which is not
valid for the Plan 9 compiler.

char* cnames8[] = {
};

This change makes mkanames not declaring the
cnames array when no C_ constants are found.

LGTM=iant
R=minux, iant
CC=golang-codereviews
https://golang.org/cl/117680043
2014-08-06 06:11:41 -07:00
Alex Brainman
bf13b711bd runtime: burn cpu before calling yield in windows runtime.systime
LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/117670043
2014-08-06 17:24:03 +10:00
Shenghou Ma
6503d40051 undo CL 114420043 / b613f2acdf69
Broke freebsd/amd64 due to exposure of a latent bug.

««« original CL description
cmd/ld: fix operator precedence

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/114420043
»»»

TBR=dfc
R=dave
CC=golang-codereviews
https://golang.org/cl/120630043
2014-08-06 02:07:31 -04:00
Rui Ueyama
bbc6bb9a99 liblink: encode MOVBQZX as MOVZBL instead of MOVZBQ
LGTM=rsc
R=golang-codereviews, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/118480046
2014-08-05 21:38:41 -07:00
Shenghou Ma
d69d0fe92b liblink, cmd/dist, cmd/5l: introduce %^ and move C_* constants.
The helps certain diagnostics and also removed duplicated enums as a side effect.

LGTM=dave, rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/115060044
2014-08-06 00:31:22 -04:00
Shenghou Ma
ae027f52fe cmd/cc, cmd/gc: set ctxt->debugvlog with debug['v']
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/118610043
2014-08-06 00:27:14 -04:00
Shenghou Ma
45bd2f8c45 cmd/5l, cmd/6l, cmd/8l, cmd/ld: remove unused code, consolidate enums
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/120220043
2014-08-06 00:25:52 -04:00
Shenghou Ma
08ee2661f2 liblink: support big-endian properly
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/115300044
2014-08-06 00:25:41 -04:00
Shenghou Ma
2c181f0355 cmd/ld: fix operator precedence
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/114420043
2014-08-06 00:25:05 -04:00
Shenghou Ma
de14137b4f runtime: get rid of SA_RESTORER on ARM.
The manpages says SA_RESTORER is obsolete, and indeed, not every architecture
support it. However, sadly it's required on x86_64, see http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/signal.c?id=26bcd8b72563b4c54892c4c2a409f6656fb8ae8b#n430, so only use it on x86.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/115450043
2014-08-06 00:24:55 -04:00
Shenghou Ma
3c24b60fd3 liblink: use LinkArch.textflag() to get text and dataflag
Rather than switch on thechar.

LGTM=rsc, dave
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/119330043
2014-08-06 00:24:43 -04:00
Shenghou Ma
61b1d3a719 runtime: remove dead code
LGTM=bradfitz, dave, ruiu
R=rsc, iant, bradfitz, dave, ruiu
CC=golang-codereviews
https://golang.org/cl/116610043
2014-08-06 00:24:31 -04:00
Shenghou Ma
18ab35f7ba runtime: disable aeshash on NaCl at compile time
Fixes build for nacl/386.

LGTM=dave
R=khr, bradfitz, dave, dan.kortschak, rsc
CC=golang-codereviews
https://golang.org/cl/121080043
2014-08-06 00:24:11 -04:00
Rui Ueyama
24db881689 liblink: shorter encoding for zeroing register
Encode MOV $0, %ax as XOR %eax, %eax instead of
XOR %rax, %rax. If an operand register does not
need REX.w bit (i.e. not one of R8-R15), it is
encoded in 2 bytes instead of 3 bytes.

LGTM=rsc
R=golang-codereviews, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/115580044
2014-08-05 21:10:07 -07:00
Matthew Dempsky
0da4b2dbc2 cmd/cgo: fix recursive type mapping
Instead of immediately completing pointer type mappings, add them to
a queue to allow them to be completed later.  This fixes issues	caused
by Type() returning arbitrary in-progress type mappings.

Fixes #8368.
Fixes #8441.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/122850043
2014-08-05 18:16:56 -07:00
Matthew Dempsky
f7a8adbd51 cmd/cgo: fix handling of defs_linux.go
Instead of including <sys/types.h> to get size_t, instead include
the ISO C standard <stddef.h> header, which defines fewer additional
types at risk of colliding with the user code.  In particular, this
prevents collisions between <sys/types.h>'s userspace definitions with
the kernel definitions needed by defs_linux.go.

Also, -cdefs mode uses #pragma pack, so we can keep misaligned fields.

Fixes #8477.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/120610043
2014-08-05 18:12:32 -07:00
Mikio Hara
48e7533783 net: separate DNS transport from DNS query-response interaction
Before fixing issue 6579 this CL separates DNS transport from
DNS message interaction to make it easier to add builtin DNS
resolver control logic.

Update #6579

LGTM=alex, kevlar
R=golang-codereviews, alex, gobot, iant, minux, kevlar
CC=golang-codereviews
https://golang.org/cl/101220044
2014-08-06 09:58:47 +09:00
Ian Lance Taylor
f2f17c0ff2 cmd/cgo: for -godefs, promote first field of anonymous union
Update #6677

When a struct contains an anonymous union, use the type and
name of the first field in the union.

This should make the glibc <sys/resource.h> file work; in that
file struct rusage has fields like

__extension__ union
{
        long int ru_maxrss;
        __syscall_slong_t __ru_maxrss_word;
};

in which the field that matters is ru_maxrss and
__ru_maxrss_word just exists to advance to the next field on
systems where the kernel uses long long fields but userspace
expects long fields.

LGTM=mikioh.mikioh
R=golang-codereviews, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/106260044
2014-08-05 17:10:15 -07:00
Dmitriy Vyukov
f6f2f77142 runtime: cache one GC workbuf in thread-local storage
We call scanblock for lots of small root pieces
e.g. for every stack frame args and locals area.
Every scanblock invocation calls getempty/putempty,
which accesses lock-free stack shared among all worker threads.
One-element local cache allows most scanblock calls
to proceed without accessing the shared stack.

LGTM=rsc
R=golang-codereviews, rlh
CC=golang-codereviews, khr, rsc
https://golang.org/cl/121250043
2014-08-06 01:50:37 +04:00