aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)Author
2011-07-12[release-branch.r58] cgo: handle new Apple LLVM-based gcc from Xcode 4.2release.r58.1Russ Cox
««« CL 4607045 / 142f0bc0d6e7 cgo: handle new Apple LLVM-based gcc from Xcode 4.2 That gcc does not include enumerator names and values in its DWARF debug output. Create a data block from which we can read the values instead. Fixes #1881. R=iant CC=golang-dev https://golang.org/cl/4607045 »»» R=adg CC=golang-dev https://golang.org/cl/4708042
2011-06-29[release-branch.r58] gofix: fixes for os/signal changesAndrew Gerrand
««« CL 4630056 / 8fe2bc5c3d53 gofix: fixes for os/signal changes Fixes #1971. R=adg, rsc CC=golang-dev https://golang.org/cl/4630056 »»» R=golang-dev, r CC=golang-dev https://golang.org/cl/4645071
2011-06-29[release-branch.r58] gopprof: update list of memory allocatorsAndrew Gerrand
««« CL 4650048 / 09d52e36dab9 gopprof: update list of memory allocators Also import new weblist command from Google version. R=r, bradfitz CC=golang-dev https://golang.org/cl/4650048 »»» R=rsc CC=golang-dev https://golang.org/cl/4654072
2011-06-29[release-branch.r58] ld: dwarf emit filenames in debug_line header instead ↵Andrew Gerrand
of as extended opcodes. ««« CL 4609043 / caaab1e64d49 ld: dwarf emit filenames in debug_line header instead of as extended opcodes. Makes it possible for older tools like objdump to find the filenames, fixes objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out fixes #1950 R=rsc CC=golang-dev https://golang.org/cl/4609043 »»» R=rsc CC=golang-dev https://golang.org/cl/4648068
2011-06-29[release-branch.r58] 6g, 8g: fix goto fixAndrew Gerrand
««« CL 4632041 / cbc2b570b2ca 6g, 8g: fix goto fix R=ken2 CC=golang-dev https://golang.org/cl/4632041 »»» R=rsc CC=golang-dev https://golang.org/cl/4667046
2011-06-29[release-branch.r58] gc: work around goto bugAndrew Gerrand
««« CL 4629042 / ec3b60d1fe6e gc: work around goto bug R=ken2 CC=golang-dev https://golang.org/cl/4629042 »»» R=rsc CC=golang-dev https://golang.org/cl/4662063
2011-06-09gopack: make unused page function a fatal errorDave Cheney
R=iant, rsc CC=golang-dev https://golang.org/cl/4601051
2011-06-09gopack: remove warning from the use of mktempDave Cheney
gcc-4.6 considers mktemp to be racey R=golang-dev, rsc, iant CC=golang-dev https://golang.org/cl/4602050
2011-06-095l: fix softfloat nitsRuss Cox
Need to load math.a so that sqrtGoC is available. Also was missing prototype. R=ken2 CC=golang-dev https://golang.org/cl/4517148
2011-06-09gc: compactframe breaks arm - fix buildRuss Cox
R=lvd CC=golang-dev https://golang.org/cl/4591063
2011-06-10gc: nitLuuk van Dijk
R=rsc CC=golang-dev https://golang.org/cl/4604041
2011-06-095l: delete dead codeRuss Cox
Thumb code and ARM pre-V4 code is unused, unmaintained, and almost certainly wrong by now. Every time I try to change 5l I have to sort out what's dead code and what's not. 30% of lines of code in this directory deleted. R=ken2 CC=golang-dev https://golang.org/cl/4601049
2011-06-10gc: compact stackframeLuuk van Dijk
After allocparams and walk, remove unused auto variables and re-layout the remaining in reverse alignment order. R=rsc CC=golang-dev https://golang.org/cl/4568068
2011-06-09math: add sqrt_arm.s and sqrtGoC.go as fallback to soft fp emulationFan Hongjian
5a: add SQRTF and SQRTD 5l: add ASQRTF and ASQRTD Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt R=rsc, dave, m CC=golang-dev https://golang.org/cl/4551082
2011-06-09gc: nitsRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4572052
2011-06-08gofmt: update test script so that it passes againRobert Griesemer
(TODO: should replace this with a Go program, eventually) R=bradfitz CC=golang-dev https://golang.org/cl/4584047
2011-06-08ebnf: follow EBNF for EBNF faithfullyRobert Griesemer
Apply analogous changes in godoc/spec.go. Fixes #1829. R=nmessenger, r CC=golang-dev https://golang.org/cl/4528127
2011-06-08gc: alternative clang compatible abort.Dave Cheney
Tested on clang 2.9/amd64 R=rsc, jeff, r CC=golang-dev https://golang.org/cl/4517143
2011-06-07gofix: fix diff regression from exec changeBrad Fitzpatrick
Also pass -u to diff to be consistent with gofmt. Fixes #1619 R=golang-dev, gri CC=golang-dev https://golang.org/cl/4591041
2011-06-07godefs: do not assume forward type references are enumsRobert Hencke
Fixes #1466. R=mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/4564043
2011-06-07ld: fix and simplify ELF symbol generationAnthony Martin
I started looking at this code because the nm in GNU binutils was ignoring the first symbol in the .symtab section. Apparently, the System V ABI reserves the first entry and requires all fields inside to be set to zero. The list of changes is as follows: · reserve the first symbol entry (as noted above) · fix the section indices for .data and .bss symbols · factor out common code for Elf32 and Elf64 · remove the special case for elfsymo in [568]l/asm.c:/^asmb · add the "etext" symbol in 6l · add static symbols R=rsc CC=golang-dev https://golang.org/cl/4524075
2011-06-07gc/lex.c: fix formatting of #include statementCaine Tighe
R=rsc, gri CC=golang-dev https://golang.org/cl/4564048
2011-06-07gofmt: fix -d regression from exec changeBrad Fitzpatrick
Fixes #1916 R=golang-dev, gri CC=golang-dev https://golang.org/cl/4590041
2011-06-07cgo: support non intel gcc machine flagsDave Cheney
R=adg CC=golang-dev https://golang.org/cl/4528124
2011-06-06gc: enable building under clang/2.9Dave Cheney
To build under clang, pass the path to clang in CC when calling ./make.bash CC=/opt/llvm/llvm-2.9/bin/clang ./make.bash Credit goes to jmhodges for suggestions. R=jeff, r, ality CC=golang-dev https://golang.org/cl/4527098
2011-06-038g: compute register liveness during regoptRuss Cox
Input code like 0000 (x.go:2) TEXT main+0(SB),$36-0 0001 (x.go:3) MOVL $5,i+-8(SP) 0002 (x.go:3) MOVL $0,i+-4(SP) 0003 (x.go:4) MOVL $1,BX 0004 (x.go:4) MOVL i+-8(SP),AX 0005 (x.go:4) MOVL i+-4(SP),DX 0006 (x.go:4) MOVL AX,autotmp_0000+-20(SP) 0007 (x.go:4) MOVL DX,autotmp_0000+-16(SP) 0008 (x.go:4) MOVL autotmp_0000+-20(SP),CX 0009 (x.go:4) CMPL autotmp_0000+-16(SP),$0 0010 (x.go:4) JNE ,13 0011 (x.go:4) CMPL CX,$32 0012 (x.go:4) JCS ,14 0013 (x.go:4) MOVL $0,BX 0014 (x.go:4) SHLL CX,BX 0015 (x.go:4) MOVL BX,x+-12(SP) 0016 (x.go:5) MOVL x+-12(SP),AX 0017 (x.go:5) CDQ , 0018 (x.go:5) MOVL AX,autotmp_0001+-28(SP) 0019 (x.go:5) MOVL DX,autotmp_0001+-24(SP) 0020 (x.go:5) MOVL autotmp_0001+-28(SP),AX 0021 (x.go:5) MOVL autotmp_0001+-24(SP),DX 0022 (x.go:5) MOVL AX,(SP) 0023 (x.go:5) MOVL DX,4(SP) 0024 (x.go:5) CALL ,runtime.printint+0(SB) 0025 (x.go:5) CALL ,runtime.printnl+0(SB) 0026 (x.go:6) RET , is problematic because the liveness range for autotmp_0000 (0006-0009) is nested completely inside a span where BX holds a live value (0003-0015). Because the register allocator only looks at 0006-0009 to see which registers are used, it misses the fact that BX is unavailable and uses it anyway. The n->pun = anyregalloc() check in tempname is a workaround for this bug, but I hit it again because I did the tempname call before allocating BX, even though I then used the temporary after storing in BX. This should fix the real bug, and then we can remove the workaround in tempname. The code creates pseudo-variables for each register and includes that information in the liveness propagation. Then the regu fields can be populated using that more complete information. With that approach, BX is marked as in use on every line in the whole span 0003-0015, so that the decision about autotmp_0000 (using only 0006-0009) still has all the information it needs. This is not specific to the 386, but it only happens in generated code of the form load R1 ... load var into R2 ... store R2 back into var ... use R1 and for the most part the other compilers generate the loads for a given compiled line before any of the stores. Even so, this may not be the case everywhere, so the change is worth making in all three. R=ken2, ken, ken CC=golang-dev https://golang.org/cl/4529106
2011-06-038l, ld: Initial adjustments for Plan 9 native compilation of 8lLucio De Re
These changes are not particularly invasive and have been tested as broadly as possible. 8l/l.h: - #pragma varargck: added some, removed duplicates. ld/dwarf.c: - As Plan 9 has no NULL, changed all occurrences to nil. - Added USED(size); where necessary. - Added (void) argument in definition of finddebugruntimepath(). - Plan 9 compiler was complaining about multiple assignments, repeaired by breaking up the commands. - Correction: havedynamic = 1; restored. ld/go.c: - Needed USED(file); in two functions. - Removed unused assignments flagged by the Plan 9 compiler. ld/lib.c: - Replaced unlink() with remove() which seems available everywhere. - Removed USED(c4); and USED(magic) no longer required. - Removed code flagged as unused by the Plan 9 compiler. - Added attributes to a number of format strings. R=rsc CC=golang-dev https://golang.org/cl/4435047
2011-06-03gc: renamed walkdef to typecheckdef and moved from walk to typedef.Luuk van Dijk
also inlined a typechecking function in dcl away. R=rsc CC=golang-dev https://golang.org/cl/4550115
2011-06-03gc: allow tags on parameters in export section of object files.Luuk van Dijk
This is in preparation of escape analysis; function parameters can now be tagged with interesting bits by the compiler by assigning to n->note. tested by having typecheck put a fake tag on all parameters of pointer type and compiling the tree. R=rsc CC=golang-dev https://golang.org/cl/4524092
2011-06-02gc: typecheck the whole tree before walking. preparation for some ↵Luuk van Dijk
escape-analysis related changes. R=rsc CC=golang-dev https://golang.org/cl/4528116
2011-06-01exec: new API, replace Run with CommandBrad Fitzpatrick
This removes exec.Run and replaces exec.Cmd with a new implementation. The new exec.Cmd represents both a currently-running command and also a command being prepared. It has a good zero value. You can Start + Wait on a Cmd, or simply Run it. Start (and Run) deal with copying stdout, stdin, and stderr between the Cmd's io.Readers and io.Writers. There are convenience methods to capture a command's stdout and/or stderr. R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar CC=golang-dev https://golang.org/cl/4552052
2011-06-01gc: make merely referencing an outer variable in a closure not force ↵Luuk van Dijk
heapallocation. before: runtime_test.BenchmarkCallClosure1 20000000 135 ns/op after: runtime_test.BenchmarkCallClosure1 500000000 6 ns/op R=rsc CC=golang-dev https://golang.org/cl/4527091
2011-06-01filepath: remove string constants. They are unnecessary.Rob Pike
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4527090
2011-06-01gobuilder: include file missing from change, fix buildAndrew Gerrand
R=golang-dev CC=golang-dev https://golang.org/cl/4539099
2011-06-01goinstall: document GOPATH and support relative/absolute installsAndrew Gerrand
goinstall: more verbose logging with -v Fixes #1901. R=rsc, n13m3y3r CC=golang-dev https://golang.org/cl/4524078
2011-05-31gc: fix m[x], _ = y.(T)Russ Cox
Fixes #1900. R=ken2 CC=golang-dev https://golang.org/cl/4561053
2011-05-31gc: disallow ... in type conversionsAnthony Martin
Fixes #1866. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/4548073
2011-05-31gc: implement new shift rulesRuss Cox
The change is that 1.0<<2 is now okay. R=ken2 CC=golang-dev https://golang.org/cl/4524084
2011-05-31gc: elide call to runtime.closure for function literals called in-place.Luuk van Dijk
before: runtime_test.BenchmarkCallClosure 5000000 499 ns/op runtime_test.BenchmarkCallClosure1 5000000 681 ns/op after: runtime_test.BenchmarkCallClosure 500000000 5 ns/op runtime_test.BenchmarkCallClosure1 10000000 160 ns/op R=rsc CC=golang-dev https://golang.org/cl/4515167
2011-05-31gc: check parameter declarations in interface fieldsAnthony Martin
Fixes #1663. Fixes #1871. R=rsc, lstoakes CC=golang-dev https://golang.org/cl/4530084
2011-05-30goinstall: skip standard packagesRuss Cox
R=adg, n13m3y3r CC=golang-dev https://golang.org/cl/4526084
2011-05-30pkg: spelling tweaks, I-ZRobert Hencke
also, a few miscellaneous fixes to files outside pkg R=golang-dev, dsymonds, mikioh.mikioh, r CC=golang-dev https://golang.org/cl/4517116
2011-05-30goinstall: use bash to execute gomakeAlex Brainman
R=golang-dev, r, adg CC=golang-dev https://golang.org/cl/4551074
2011-05-28gotest, pkg/exec: use bash instead of sh to execute shell scripts on windowsAlex Brainman
As suggested by dho, iant2. R=golang-dev, rsc CC=devon.odell, golang-dev, iant https://golang.org/cl/4515147
2011-05-27cgo: restrict #cgo directives to prevent shell expansionGustavo Niemeyer
Fixes issue #1879. Directives were not directly expanded, but since their content ended up in makefiles, further expansion would take place there. This prevents such artifacts by restricting the set of characters that may be used in a directive value. To build the list of safe characters I went through the contents of /usr/lib/pkgconfig and extracted LDFLAGS and CFLAGS information, so hopefully this is a reasonable default to get started. R=rsc CC=golang-dev https://golang.org/cl/4532092
2011-05-26cgo: support pkg-config for flags and libsGustavo Niemeyer
Fixes issue #1853. R=golang-dev, mattn.jp, adg CC=golang-dev https://golang.org/cl/4550084
2011-05-26gc: patch y.tab.c to fix build when using Bison 2.5Ian Lance Taylor
Fixes #1843. R=rsc CC=golang-dev https://golang.org/cl/4535101
2011-05-25gc: typoRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4539086
2011-05-255g: alignment fixesRuss Cox
Makes all.bash work after echo 4 >/proc/cpu/alignment, which means kill the process on an unaligned access. The default behavior on DreamPlug/GuruPlug/SheevaPlug is to simulate an ARMv3 and just let the unaligned accesses stop at the word boundary, resulting in all kinds of surprises. Fixes #1240. R=ken2 CC=golang-dev https://golang.org/cl/4551064
2011-05-255l: fix buildRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4538095