1
0
mirror of https://github.com/golang/go synced 2024-10-08 10:41:20 -06:00
Commit Graph

21789 Commits

Author SHA1 Message Date
Shenghou Ma
5e4989cf0a [dev.power64] cmd/gc: handle thechar=='9', disable nilopt() for now
LGTM=rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/121630043
2014-08-12 20:57:32 -04:00
Rob Pike
8bca148a3e all: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH
The file is used by assembly code to define symbols like NOSPLIT.
Having it hidden inside the cmd directory makes it hard to access
outside the standard repository.
Solution: As with a couple of other files used by cgo, copy the
file into the pkg directory and add a -I argument to the assembler
to access it. Thus one can write just
        #include "textflag.h"
in .s files.

The names in runtime are not updated because in the boot sequence the
file has not been copied yet when runtime is built. All other .s files
in the repository are updated.

Changes to doc/asm.html, src/cmd/dist/build.c, and src/cmd/go/build.go
are hand-made. The rest are just the renaming done by a global
substitution. (Yay sam).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/128050043
2014-08-12 17:04:45 -07:00
Russ Cox
ce35994d4e cmd/6c, cmd/6g: avoid address-as-constant in amd64 instructions
This allows implementing address-of-global
as a pc-relative address instead of as a
32-bit integer constant.

LGTM=rminnich, iant
R=golang-codereviews, rminnich, iant
CC=golang-codereviews
https://golang.org/cl/128070045
2014-08-12 19:53:11 -04:00
Russ Cox
3763a395b2 cmd/go: adjust import comment error
Fixes #7453.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/127210043
2014-08-12 19:52:04 -04:00
Russ Cox
9aa1e9afda runtime: avoid using address as constant in amd64 assembly
This allows changing the addressing mode for constant
global addresses to use pc-relative addressing.

LGTM=rminnich, iant
R=golang-codereviews, rminnich, iant
CC=golang-codereviews
https://golang.org/cl/129830043
2014-08-12 19:51:20 -04:00
Shenghou Ma
b1c9a8bce3 [dev.power64] cmd/9g: implement zerorange
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121540043
2014-08-12 19:51:01 -04:00
Shenghou Ma
56949d33d8 [dev.power64] sync/atomic: implement for asm_power64x.s
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124220043
2014-08-12 19:50:51 -04:00
Shenghou Ma
e7e668d717 [dev.power64] math: implement Abs, add power64/power64le forwarding assembly functions
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/119670043
2014-08-12 19:50:40 -04:00
Shenghou Ma
ab29d5b4ae [dev.power64] runtime: add defs3_linux.go to generate defs_linux_power64{,le}.h
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128070043
2014-08-12 19:50:30 -04:00
Shenghou Ma
91447ab502 [dev.power64] runtime: auto-generated headers for linux/power64 and linux/power64le
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123280043
2014-08-12 19:50:18 -04:00
Shenghou Ma
fb57459b48 [dev.power64] runtime: move noasm_arm.goc to noasm.goc
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121590043
2014-08-12 19:50:03 -04:00
Shenghou Ma
2abf3c5583 [dev.power64] runtime: changes to the portable part for linux/power64 and linux/power64le
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121580044
2014-08-12 19:49:52 -04:00
Shenghou Ma
f2d43ec7cd [dev.power64] os/signal: support for linux/power64 and linux/power64le
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121580043
2014-08-12 19:49:41 -04:00
Shenghou Ma
c74a4d4add [dev.power64] syscall: script changes for power64
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123290043
2014-08-12 19:49:31 -04:00
Shenghou Ma
e0aaf2b2db [dev.power64] syscall: auto-generated source for linux/power64 and linux/power64le.
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127170043
2014-08-12 19:49:18 -04:00
Shenghou Ma
f3e2023764 [dev.power64] syscall: the manually written parts for linux/power64 and linux/power64le
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129800043
2014-08-12 19:49:03 -04:00
Shenghou Ma
5f691cfaf1 [dev.power64] runtime: manually written parts for linux/power64 and linux/power64le, checkpoint
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122430043
2014-08-12 19:48:49 -04:00
Rob Pike
b049dc3074 doc/compat1.html: link to go.sys
You talked me into it. This and other links should be updated
once the new import paths for the subrepos are established.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/124260043
2014-08-12 15:45:35 -07:00
Rob Pike
160b2461b6 syscall: freeze the package
Add a clause to the doc comment for the package and a
paragraph in the compatibility document explaining the
situation.

LGTM=bradfitz, adg, rsc
R=golang-codereviews, adg, bradfitz, minux, rsc
CC=golang-codereviews
https://golang.org/cl/129820043
2014-08-12 15:28:45 -07:00
Russ Cox
9abf0b6e9f cmd/ld: handle large link base addresses
codeblk and datblk were truncating their
arguments to int32. Don't do that.

LGTM=dvyukov, rminnich
R=iant, dvyukov, rminnich
CC=golang-codereviews
https://golang.org/cl/126050043
2014-08-12 17:41:16 -04:00
Russ Cox
0c6146711c cmd/go, go/build: implement import comment checking
See golang.org/s/go14customimport for design.

Added case to deps_test to allow go/build to import regexp.
Not a new dependency, because go/build already imports go/doc
which imports regexp.

Fixes #7453.

LGTM=r
R=r, josharian
CC=golang-codereviews
https://golang.org/cl/124940043
2014-08-12 17:41:03 -04:00
Andrew Gerrand
f497885c63 doc: document go1.3.1
LGTM=r
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/126060043
2014-08-13 07:39:52 +10:00
Brad Fitzpatrick
67e1d40031 crypto/rand: use getrandom system call on Linux
Adds internal/syscall package.

Fixes #8520

LGTM=r, agl
R=agl, rsc, r
CC=golang-codereviews, iant
https://golang.org/cl/123260044
2014-08-12 14:35:27 -07:00
Dmitriy Vyukov
1837419f30 runtime: remove FlagNoProfile
Turns out to be unused as well.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, khr
https://golang.org/cl/127170044
2014-08-13 01:03:32 +04:00
Dmitriy Vyukov
fe7b29f5fd runtime/pprof: fix data race
It's unclear why we do this broken double-checked locking.
The mutex is not held for the whole duration of CPU profiling.
Fixes #8365.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/116290043
2014-08-13 01:02:01 +04:00
Matthew Dempsky
11016f62d8 cmd/cgo: make C function pointers non-assignable
Fixes #7757.
Fixes #8488.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/118690044
2014-08-12 12:55:12 -07:00
Thiago Fransosi Farina
e4d4787581 dist: Make vaddn private to buf.c
This function does not have a declaration/prototype in a.h, and it is used only
in buf.c, so it is local to it and thus can be marked as private by adding
'static' to it.

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122300043
2014-08-12 07:49:10 -07:00
Ian Lance Taylor
881fbf9a7d A+C: Thiago Fransosi Farina (individual CLA)
Generated by a+c.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/125960043
2014-08-12 07:48:34 -07:00
Matthew Dempsky
444b928405 run.bash: run misc/cgo/testgodefs/test.bash
misc/cgo/testgodefs was added by revision d1cf884a594f, but not
add to run.bash.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/129760044
2014-08-12 07:13:52 -07:00
Matthew Dempsky
31a996edb6 cmd/cgo: fix default alignment for empty structs
Fixes #5242.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/125120043
2014-08-11 22:10:17 -07:00
Shenghou Ma
4928b2074b [dev.power64] cmd/9g: first check point
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123170043
2014-08-11 23:44:55 -04:00
Shenghou Ma
552d8b79dd [dev.power64] cmd/9l/9.out.h: introduce NFREG, REGG, REGRT1 and REGRT2
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125990043
2014-08-11 23:44:38 -04:00
Shenghou Ma
1a1d450712 [dev.power64] cmd/9l: introduce the power64 linker, based loosely on 5l
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123940043
2014-08-11 23:44:23 -04:00
Shenghou Ma
6e692b35bb [dev.power64] cmd/cgo: add {ppc,power}64{,le} to pointer and int size maps
LGTM=rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/119640043
2014-08-11 23:43:51 -04:00
Shenghou Ma
059d089fc0 [dev.power64] debug/elf: add power64 support along with relocation test
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125910043
2014-08-11 23:43:34 -04:00
Shenghou Ma
5cb7da7547 [dev.power64] syscall: remove duplicated constants
Without this CL, simply running mkall.sh for Linux will generate duplicated constants
for termios. I verified that after this CL, mkall.sh will generate almost identical
z* files for linux/amd64.

LGTM=rsc
R=rsc, iant, r
CC=golang-codereviews
https://golang.org/cl/124990043
2014-08-11 23:43:15 -04:00
Shenghou Ma
8881e032d4 [dev.power64] runtime: ignore rt_sigaction error if it's for SIGRTMAX.
Workaround a qemu linux user space emulation bug.
ref: http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/signal.c;h=1141054be2170128d6f7a340b41484b49a255936;hb=HEAD#l82

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124900043
2014-08-11 23:32:33 -04:00
Shenghou Ma
26c9bbf736 [dev.power64] runtime: rename traceback_arm.c to traceback_lr.c
Also make it more portable by not hardcoding pointer sizes.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127780043
2014-08-11 23:32:08 -04:00
Shenghou Ma
40d7a6d582 [dev.power64] cmd/ld: add MAXIO back in lib.h
It was accidentally removed.

LGTM=dave
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/124880043
2014-08-11 23:31:28 -04:00
Matthew Dempsky
03e6a88ef0 cmd/cgo: iterate over names in deterministic order
This makes GCC behavior (and cgo build failures) deterministic.

Fixes #8487.

Ran this shell command on linux/amd64 (Ubuntu 12.04) before and
after this change:

    for x in `seq 100`; do
      go tool cgo -debug-gcc=true issue8441.go 2>&1 | md5sum
    done | sort | uniq -c

Before:
    67 2cdcb8c7c4e290f7d9009abc581b83dd  -
    10 9a55390df94f7cec6d810f3e20590789  -
    10 acfad22140d43d9b9517bbc5dfc3c0df  -
    13 c337f8fee2304b3a8e3158a4362d8698  -

After:
    100 785c316cbcbcd50896695050e2fa23c1  -

LGTM=minux, iant
R=golang-codereviews, bradfitz, minux, iant
CC=golang-codereviews
https://golang.org/cl/126990043
2014-08-11 16:49:13 -07:00
Andres Erbsen
fce63888ce crypto/tls: implement tls-unique channel binding (RFC 5929 section 3).
Tested against GnuTLS and Python.

LGTM=agl
R=golang-codereviews, agl, ashankar
CC=agl, golang-codereviews
https://golang.org/cl/117100043
2014-08-11 16:40:42 -07:00
Andrew Gerrand
f46f3432a6 compress/{gzip,zlib}: mention that Close flushes
Our other CloseFlushers (archive/tar, compress/flate) do mention this.

The original change was accidentally submitted to the release branch:
        https://golang.org/cl/117430043/

TBR=rsc
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/124130043
2014-08-12 09:27:39 +10:00
Chris Manghane
897f7a31fa cmd/gc: comma-ok assignments produce untyped bool as 2nd result
LGTM=rsc
R=gri, rsc
CC=golang-codereviews
https://golang.org/cl/127950043
2014-08-11 16:11:55 -07:00
Shenghou Ma
b5674a2b72 cmd/8g: fix build
Fixes #8510.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/129720043
2014-08-11 17:11:31 -04:00
Shenghou Ma
4769f87e0d runtime: no need to set R9 to m for runtime.sigpanic anymore
Replaces CL 123980043 which I created on the dev.power64 branch.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123120043
2014-08-11 17:10:23 -04:00
Shenghou Ma
2a37efbe1e misc/nacl/testzip.proto: add fewer files to the zip
LGTM=bradfitz, rsc
R=rsc, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/126940043
2014-08-11 16:56:36 -04:00
Russ Cox
988516ec46 A+C: Andrew Bursavich (individual CLA)
Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/124120043
2014-08-11 16:54:34 -04:00
Russ Cox
5b63ce4e19 cmd/6g, cmd/8g: fix, test byte-sized magic multiply
Credit to Rémy for finding and writing test case.

Fixes #8325.

LGTM=r
R=golang-codereviews, r
CC=dave, golang-codereviews, iant, remyoudompheng
https://golang.org/cl/124950043
2014-08-11 15:24:36 -04:00
Matthew Dempsky
eae9fee3bf cmd/link: fix zig-zag decoding
The >>1 shift needs to happen before converting to int32, otherwise
large values will decode with an incorrect sign bit.

The <<31 shift can happen before or after, but before is consistent
with liblink and the go12symtab doc.

Bug demo at http://play.golang.org/p/jLrhPUakIu

LGTM=rsc
R=golang-codereviews, minux, rsc
CC=golang-codereviews
https://golang.org/cl/119630043
2014-08-11 13:53:38 -04:00
Rob Pike
5a17aaa830 doc/go1.4.txt: go.sys subrepo created
CC=golang-codereviews
https://golang.org/cl/124050043
2014-08-08 14:54:04 -07:00