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

35 Commits

Author SHA1 Message Date
Russ Cox
d9c989fa25 various: avoid %ld etc
The Plan 9 tools assume that long is 32 bits.
We converted all instances of long to int32 when
importing the code but missed the print formats.
Because int32 is always int on the compilers we use,
it is never correct to use %lux, %ld, etc.  Convert to %ux, %d, etc.

(It matters because on 64-bit gcc, long is 64 bits,
so we were printing 32-bit quantities with 64-bit formats.)

R=ken2
CC=golang-dev
https://golang.org/cl/2491041
2010-10-13 16:20:22 -04:00
Russ Cox
2cda191aef 6c, 8c: show line numbers in -S output
R=ken2
CC=golang-dev
https://golang.org/cl/2107047
2010-09-10 11:53:51 -04:00
Russ Cox
aafe474ec9 build: $GOBIN defaults to $GOROOT/bin
R=r
CC=golang-dev
https://golang.org/cl/1982049
2010-08-24 20:00:33 -04:00
Russ Cox
e473f42b2d amd64: use segment memory for thread-local storage
Returns R14 and R15 to the available register pool.
Plays more nicely with ELF ABI C code.
In particular, our signal handlers will no longer crash
when a signal arrives during execution of a cgo C call.

Fixes #720.

R=ken2, r
CC=golang-dev
https://golang.org/cl/1847051
2010-08-04 17:50:22 -07:00
Rob Pike
9e481e2905 fix spelling of align
R=rsc
CC=golang-dev
https://golang.org/cl/778041
2010-03-26 09:56:57 -07:00
Ian Lance Taylor
9e0ae94e72 Add support for #pragma dynexport.
R=rsc
CC=golang-dev
https://golang.org/cl/661043
2010-03-23 06:46:30 -07:00
Ian Lance Taylor
f54d73b880 Rename dynld to dynimport throughout.
Cgo users will need to rerun cgo.

R=rsc
CC=golang-dev
https://golang.org/cl/692041
2010-03-22 19:58:55 -07:00
Ken Thompson
60c2e5f453 issue 608
error compiling if(long long) in 6c compiler

R=rsc
CC=golang-dev
https://golang.org/cl/657042
2010-03-19 14:20:15 -07:00
Russ Cox
36c5c5bf40 cc: disallow ... argument unless NOSPLIT is set.
check that NOSPLIT functions don't use too much stack.
correct some missing NOSPLITs in the runtime library.

Fixes bug reported in
https://groups.google.com/group/golang-nuts/t/efff68b73941eccf

R=ken2
CC=golang-dev
https://golang.org/cl/236041
2010-03-04 15:34:25 -08:00
Ken Thompson
424f9ca6ab change print print buffer size
to go with the full path names

R=rsc
CC=golang-dev
https://golang.org/cl/195079
2010-01-27 15:37:46 -08:00
Charles L. Dorian
3ca1b1d27f Continuation of issue 221 fix. When 8g or 6g or 5g are called with a
UTF-8 string, Yconv() converts it into an octal sequence. If the
string converted to more than 30 bytes, the str buffer would
overflow. For example, 4 Greek runes became 32 bytes, 3 Hiragana
runes became 36 bytes, and 2 Gothic runes became 32 bytes. In
8l, 6l and 5l the function is Sconv(). For some reason, only 5l uses
the constant STRINGSZ (defined as 200) for the buffer size.

R=rsc
https://golang.org/cl/168045
2009-12-09 11:56:45 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Russ Cox
18ccbc69f8 tweak documentation of commands
so that first sentence is better for cmd page.

live at http://r45:3456/cmd/

R=gri, r
http://go/go-review/1024034
2009-11-09 11:45:15 -08:00
Rob Pike
2bc63f2367 First steps at command documentation: C compilers and linkers.
Each command gets a doc.go file for godoc to analyze. Its main
element is a package comment.

R=rsc
CC=go-dev
http://go/go-review/1018029
2009-11-03 16:05:47 -08:00
Russ Cox
11d3805579 clean more
R=r
DELTA=40  (9 added, 3 deleted, 28 changed)
OCL=35277
CL=35305
2009-10-03 10:38:03 -07:00
Russ Cox
165a99038f ffi -> dynld.
move out of export data into its own section

R=r
DELTA=222  (71 added, 99 deleted, 52 changed)
OCL=33801
CL=33808
2009-08-24 17:27:55 -07:00
Russ Cox
8c253bcae5 first attempt at real FFI support.
in a .6 file, an export line

	//ffi T localfib remotefib remote.so

means the dynamic linker should initialize
localfib, always a pointer, to the address of
remotefib, either text (T) or data (D) after
loading remote.so.

the C compiler will generate an export section
when given the pragmas

	#pragma package fib
	#pragma ffi T localfib remotefib remote.so

needing #pragma package is a bit of a kludge
and hopefully could go away later.

this is just the 6 tool chain support.
other architectures will happen once 6 settles down.

code using this to do FFI is in a later CL.

R=r
DELTA=161  (141 added, 14 deleted, 6 changed)
OCL=33783
CL=33795
2009-08-24 16:15:21 -07:00
Rob Pike
7b366e9c43 fix build
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33174
CL=33174
2009-08-13 09:35:42 -07:00
Russ Cox
f63b0d6b71 silence gcc warning
R=ken
OCL=33144
CL=33144
2009-08-12 18:14:07 -07:00
Phil Pennock
d6f89c69c4 Support use of $GOBINDIR to override $HOME/bin
R=r,gri,rsc
APPROVED=rsc
DELTA=53  (12 added, 6 deleted, 35 changed)
OCL=31822
CL=32282
2009-07-28 11:23:24 -07:00
Russ Cox
9e2f2fcd2e compilers were inconsistent about
whether no register argument was
REGARG == 0 or REGARG < 0.
use REGARG < 0 because arm needs 0 for R0.

R=ken
OCL=31562
CL=31566
2009-07-13 19:20:43 -07:00
Russ Cox
27432d67ec move 6c/pgen.c, 6c/pswt.c into cc
and make 5c, 8c use them.

centralizes reachability analysis
and switch generation.

now 8c doesn't have spurious warnings
in pkg/runtime.

R=ken
OCL=31266
CL=31266
2009-07-07 10:07:15 -07:00
Ken Thompson
cb15bbe748 bug in stack size used in
extending segmented stack

R=r
OCL=27319
CL=27319
2009-04-10 15:23:19 -07:00
Ken Thompson
4f49b88dda optimizer bug w STOstring
R=r
OCL=23820
CL=23820
2009-01-29 15:13:36 -08:00
Ken Thompson
e90314d024 pragma textflag
fixes latent bugs in go and defer

R=r
OCL=23613
CL=23613
2009-01-27 14:12:35 -08:00
Ken Thompson
902a4d5f29 6c bug with large constants
R=r
OCL=19056
CL=19056
2008-11-11 18:15:36 -08:00
Russ Cox
28912ce03f fix compiler warnings
R=r
DELTA=44  (10 added, 9 deleted, 25 changed)
OCL=17502
CL=17502
2008-10-20 15:26:38 -07:00
Russ Cox
34514bdb72 Use a single Make.conf for setting CC, etc.
This makes it easy to build with other flags
(like -ggdb) or other compilers (like cc64).

R=r
DELTA=45  (6 added, 22 deleted, 17 changed)
OCL=13790
CL=13793
2008-08-03 23:03:31 -07:00
Russ Cox
9aad9fef76 make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.

(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)

the longs were rare enough that i don't think
it will cause integration problems.

R=ken
OCL=13787
CL=13789
2008-08-03 17:25:15 -07:00
Ken Thompson
3f982aeaf6 morestack magic number
automatically generated in 6g and 6c,
manually set in 6a. format is
	TEXT	a(SB),, $a-b
where a is auto size and b is parameter size

SVN=126946
2008-07-12 17:16:22 -07:00
Rob Pike
69b74c3953 import the plan 9 libraries libc (lib9) and libbio into the tree.
remove the dependency on /home/r.

SVN=122482
2008-06-12 13:26:16 -07:00
Rob Pike
2694a85a52 tweaks in clean rules and dependencies
SVN=122274
2008-06-11 18:01:45 -07:00
Rob Pike
461d1b7987 convert from mk to make
phew.

SVN=122266
2008-06-11 17:50:07 -07:00
Ken Thompson
8527f49e24 goos and goarch
SVN=121349
2008-06-05 16:57:26 -07:00
Rob Pike
0cafb9ea3d Add compiler source to new directory structure
SVN=121164
2008-06-04 14:37:38 -07:00