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

21769 Commits

Author SHA1 Message Date
Russ Cox
27e657ef68 [dev.power64] cmd/9g: fix floating-point comparison for NaN
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/127300043
2014-08-13 15:49:19 -04:00
Shenghou Ma
f3f332851f [dev.power64] cmd/9g: add missing break
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125260043
2014-08-13 15:49:07 -04:00
Shenghou Ma
856124a1cd [dev.power64] runtime: fix build
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128180044
2014-08-13 14:52:11 -04:00
Russ Cox
ebf42035b7 [dev.power64] runtime: fix newstackcall
moreframesize is a uint32, not a uint64.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124310043
2014-08-13 14:52:01 -04:00
Russ Cox
6e73ae88b5 [dev.power64] cmd/9l, math/big, runtime, syscall: fixes for power64
On the machine I'm using, the hardware page size seems to be 64 kB.
Make ELF rounding and mmap quantum 64 kB to match.

Error numbers returned from kernel are positive; do not negate.

Implement stubs for math/big.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124300043
2014-08-13 14:36:29 -04:00
Matthew Dempsky
078a9cbc6c cmd/cgo, debug/dwarf: fix translation of zero-size arrays
In cgo, now that recursive calls to typeConv.Type() always work,
we can more robustly calculate the array sizes based on the size
of our element type.

Also, in debug/dwarf, the decision to call zeroType is made
based on a type's usage	within a particular struct, but dwarf.Type
values are cached in typeCache, so the modification might affect
uses of the type in other structs.  Current compilers don't appear
to share DWARF type entries for "[]foo" and "[0]foo", but they also
don't consistently share type entries in other cases.  Arguably
modifying the types is an improvement in some cases, but varying
translated types according to compiler whims seems like a bad idea.

Lastly, also in debug/dwarf, zeroType only needs to rewrite the
top-level dimension, and only if the rest of the array size is
non-zero.

Fixes #8428.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/127980043
2014-08-13 11:16:30 -07:00
Dmitriy Vyukov
187d0f6720 runtime: keep objects in free lists marked as allocated.
Restore https://golang.org/cl/41040043 after GC rewrite.
Original description:
On the plus side, we don't need to change the bits on malloc and free.
On the downside, we need to mark objects in the free lists during GC.
But the free lists are small at GC time, so it should be a net win.

benchmark             old ns/op     new ns/op     delta
BenchmarkMalloc8      21.9          20.4          -6.85%
BenchmarkMalloc16     31.1          29.6          -4.82%

LGTM=khr
R=khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/122280043
2014-08-13 20:42:55 +04:00
Shenghou Ma
f285537b7f [dev.power64] cmd/9g: do not ignore move instructions even if from and to are samaddr()
Those moves might be significant (e.g. narrowing or widening): on Power64,
we don't distinguish between MOVWD and MOVW.

This fixes divmode.go and bug447.go.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125200043
2014-08-13 11:39:07 -04:00
Thiago Fransosi Farina
aa549ce449 cmd/dist: Reuse streq whenever possible.
Basically this cleanup replaces all the usage usages of strcmp() == 0,
found by the following command line:

$ grep -R strcmp cmd/dist | grep "0"

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/123330043
2014-08-13 06:47:30 -07:00
Andrew Gerrand
392bc8985e doc: remove the "the" in "the the" in the release notes
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/128170043
2014-08-13 23:20:39 +10:00
Shenghou Ma
b6d6eb21ec [dev.power64] runtime: switch back to old initial stack size, and disable debugging messages for rewindmorestack
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129850044
2014-08-13 01:23:00 -04:00
Shenghou Ma
f375c0eb0d [dev.power64] liblink: rewrite MOVD $con(Ra), Rb into ADD $con, Ra, Rb; fix stack split prologue
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129050043
2014-08-13 01:22:47 -04:00
Shenghou Ma
372b5cebe7 [dev.power64] cmd/9g: use loops to do memmove in sgen()
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128130044
2014-08-13 01:22:34 -04:00
Shenghou Ma
bc8d35a9cf [dev.power64] cmd/cc: round argsize to multiples of wordsize on power64
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/121640043
2014-08-13 01:22:21 -04:00
Andrew Gerrand
c31eb97942 tag go1.3.1
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/125170044
2014-08-13 14:54:54 +10:00
Andrew Gerrand
00b75a237a misc/makerelease: exit with nonzero status code on error
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/129040043
2014-08-13 14:00:10 +10:00
Shenghou Ma
268d901199 [dev.power64] runtime: fix morestack
Must not save LR.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129040044
2014-08-12 23:57:42 -04:00
Shenghou Ma
893f28ca16 [dev.power64] cmd/9g: introduce ginscon2 for CMP/CMPU, use ginscon to ADD constants
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125170043
2014-08-12 23:57:02 -04:00
Shenghou Ma
9b88857f75 [dev.power64] runtime: disable GC and use a larger default stack
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128120043
2014-08-12 22:28:25 -04:00
Shenghou Ma
f0393221a7 [dev.power64] cmd/9g: clear p->reg for ATEXT
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125150043
2014-08-12 22:25:43 -04:00
Shenghou Ma
dbf406a9d8 [dev.power64] cmd/gc: disable magic multiply optimizations for now
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/126110043
2014-08-12 22:07:15 -04:00
Shenghou Ma
05d670f757 [dev.power64] liblink: disable stack split for now
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122460043
2014-08-12 21:56:20 -04:00
Shenghou Ma
c229cec23a [dev.power64] runtime: implemnt runtime.switchtoM and runtime.onM
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129860043
2014-08-12 21:55:43 -04:00
Shenghou Ma
ca7f2c796f [dev.power64] reflect: add assembly stubs
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/126090043
2014-08-12 21:43:31 -04:00
Russ Cox
53b78c84bc [dev.power64] cmd/9a: use new flag parser
Copy main from 6a. Fixes various things, but the
main thing is the use of the new flag parser.
The go command expects to be able to use -trimpath
and not have it be interpreted as -t rimpath.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/126100043
2014-08-12 21:41:42 -04:00
Russ Cox
27627fd8ed [dev.power64] hash/crc32: use portable castagnoli on power64
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/128110044
2014-08-12 21:38:50 -04:00
Shenghou Ma
3e4dfdad34 [dev.power64] cmd/9g, cmd/gc, cmd/ld: fix build.
1. disable nonsplit stack overflow check
2. disable OLROT recognition
3. emit correct instructions for adding offsets to an address

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123310043
2014-08-12 21:22:27 -04:00
Shenghou Ma
860f941e7f [dev.power64] cmd/9c: fix endian issue in integer to floating point conversion
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/129850043
2014-08-12 20:58:05 -04:00
Shenghou Ma
560cf4c6de [dev.power64] cmd/9l: remove MAXIO (fix build)
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124270043
2014-08-12 20:57:54 -04:00
Shenghou Ma
f4529adabe [dev.power64] liblink: support stack split, long conditional branches
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123300043
2014-08-12 20:57:45 -04:00
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