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

32 Commits

Author SHA1 Message Date
Kai Backman
46e392e01c changed 5c calling convention to use stack exclusively for in
params. a number of fixes to assembly routines that assumed R0
had the first arg. one stack offset fix, arm pushes the link
register on stack top.

go/test: passes 65% (235/364) tests

R=rsc
APPROVED=rsc
DELTA=20  (11 added, 0 deleted, 9 changed)
OCL=34809
CL=34812
2009-09-18 16:45:41 -07:00
Kai Backman
a0a965fbcf fixing width bug in DATA output. some logging to make fixing
similar issues easier in the future.

R=rsc
APPROVED=rsc
DELTA=6  (1 added, 0 deleted, 5 changed)
OCL=34771
CL=34773
2009-09-17 23:08:15 -07:00
Russ Cox
fda0e78b23 fix line numbers, again.
if first function in file was dead code, it was being
discarded along with the file name information for that file.
leave the functions in the master function list longer:
let xfol take the dead code out of the code list,
and let span skip the unreachable functions during output.

before
	throw: sys·mapaccess1: key not in map

	panic PC=0x2e7b20
	throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65
		throw(0x5834f, 0x0)
	sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769
		sys·mapaccess1(0x2b9bd0, 0x0)
	gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/fmt/print.go:2926
		gob·*Encoder·Encode(0x2bb440, 0x0, 0x558b0, 0x0, 0x2e4be0, ...)
	main·walk+0x331 :1603
		main·walk(0x33a480, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300640, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300520, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300240, 0x0)
	main·walk+0x271 :1596
		main·walk(0x678f8, 0x0)
	main·main+0x22 :1610
		main·main()

after
	throw: sys·mapaccess1: key not in map

	panic PC=0x2e7b20
	throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65
		throw(0x5834f, 0x0)
	sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769
		sys·mapaccess1(0x2b9bd0, 0x0)
	gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/gob/encoder.go:319
		gob·*Encoder·Encode(0x2bb3c0, 0x0, 0x558b0, 0x0, 0x2e4be0, ...)
	main·walk+0x331 /Users/rsc/dir.go:121
		main·walk(0x2f6ab0, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301640, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301520, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301240, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x678f8, 0x0)
	main·main+0x22 /Users/rsc/dir.go:128
		main·main()
	mainstart+0xe /Users/rsc/go/src/pkg/runtime/amd64/asm.s:55
		mainstart()
	goexit /Users/rsc/go/src/pkg/runtime/proc.c:133
		goexit()

R=r
DELTA=46  (20 added, 25 deleted, 1 changed)
OCL=34094
CL=34103
2009-08-30 19:21:48 -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
Kai Backman
c6fd23ce6d 64bit literal RSH
R=rsc
APPROVED=rsc
DELTA=85  (35 added, 0 deleted, 50 changed)
OCL=33761
CL=33767
2009-08-24 13:57:04 -07:00
Russ Cox
1f177cd8b2 linker work
* use //ffi comments in package import data
    to generate relocation entries and library loads.
  * call initffi in rt0.s if present

R=r
DELTA=117  (91 added, 3 deleted, 23 changed)
OCL=33739
CL=33750
2009-08-24 10:19:31 -07:00
Kai Backman
005509e367 fix 386/arm builds
R=rsc
APPROVED=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=33640
CL=33645
2009-08-21 10:53:31 -07:00
Kai Backman
7a87a3e0df slashed warnings
R=rsc
APPROVED=rsc
DELTA=35  (2 added, 1 deleted, 32 changed)
OCL=33436
CL=33453
2009-08-18 07:16:10 -07:00
Rob Pike
e1325d916e inline lib9.h
R=rsc
DELTA=41  (20 added, 2 deleted, 19 changed)
OCL=33412
CL=33415
2009-08-17 15:14:59 -07:00
Russ Cox
002623704f remove 8.out before creating it.
hope this will work around Mac NFS bug
where writing to an 8.out that has crashed
recently sometimes wedges NFS.

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=32906
CL=32908
2009-08-07 15:22:09 -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
29e93590b0 fix undefined function error.
before:
	mainstart: undefined: main·init in mainstart
	mainstart: branch out of range in mainstart
	(95)    CALL    ,0(PC) [main·init]
	mainstart: undefined: main·main in mainstart
	mainstart: branch out of range in mainstart
	(97)    CALL    ,0(PC) [main·main]
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,

after:
	mainstart: undefined: main·init in mainstart
	mainstart: undefined: main·main in mainstart

R=r
DELTA=7  (1 added, 0 deleted, 6 changed)
OCL=31555
CL=31555
2009-07-13 16:48:09 -07:00
Russ Cox
7c534e1bd2 the ld-supplied typestrings are now obsolete
R=r
DELTA=167  (0 added, 167 deleted, 0 changed)
OCL=31304
CL=31316
2009-07-07 17:35:45 -07:00
Kai Backman
908cd8f857 cleaned up data generation in 5g, reverted 5l handling of D_ADDR.
R=rsc
APPROVED=rsc
DELTA=46  (0 added, 5 deleted, 41 changed)
OCL=31241
CL=31243
2009-07-06 23:04:56 -07:00
Kai Backman
86987055a3 agen, sgen, cgen_callret, cgen_asop, D_ADDR handling, gmove
8bit and 16bit, some optoas, replaced Addr.index with
Addr.name

empty function compiles, mutex compiles

R=rsc
APPROVED=rsc
DELTA=908  (83 added, 41 deleted, 784 changed)
OCL=31127
CL=31188
2009-07-06 06:42:37 -07:00
Kai Backman
84ef63b9d5 minor comment and debug flag for dumping all oplooks.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=31016
CL=31126
2009-07-02 21:35:39 -07:00
Kai Backman
d6197d94b5 Adding more debug output when 5l encounters a bad op
combination.

R=rsc
APPROVED=rsc
DELTA=69  (68 added, 0 deleted, 1 changed)
OCL=30798
CL=30801
2009-06-26 13:44:25 -07:00
Kai Backman
4556c04d8b more changes to make 5g code generation arm compatible.
R=rsc
APPROVED=rsc
DELTA=72  (12 added, 52 deleted, 8 changed)
OCL=30748
CL=30793
2009-06-26 04:08:20 -07:00
Kai Backman
354e61cc52 Fix compile warnings in 5l.
R=rsc
APPROVED=rsc
DELTA=8  (0 added, 0 deleted, 8 changed)
OCL=30692
CL=30695
2009-06-24 11:44:06 -07:00
Kai Backman
be639b9a51 Runtime is now starting up with a dummy c program as target:
- morestack and gosave/gogo/gocall support
- memclr and memset from inferno
- bugfixes in _rt0_arm

R=rsc
APPROVED=rsc
DELTA=304  (174 added, 36 deleted, 94 changed)
OCL=30636
CL=30642
2009-06-23 11:54:23 -07:00
Kai Backman
1ac2cfc720 grab bag of changes aimed at getting stack splitting to work:
- morestack support for 5l and arm runtime
- argsize support in 5c, 5l, ar and nm. assembly code from 5a
  will break in interesting ways unless NOSPLIT is specified
- explicit cond execution constants
- fix 5l output to use %d instead of %ld so that negative
  values show.
- added a lot of code to arm/asm.s. runtime entry code almost
  working currently aborts at gogo not implemented

R=rsc
APPROVED=rsc
DELTA=305  (125 added, 29 deleted, 151 changed)
OCL=30246
CL=30347
2009-06-16 11:25:58 -07:00
Kai Backman
f2201185ab Added ld/go.c functionality into 5l, primarily dead code
removal and typesigs and strings.

Also added new header support to 5c/5a/5l.

R=rsc
APPROVED=rsc
DELTA=98  (66 added, 10 deleted, 22 changed)
OCL=30103
CL=30123
2009-06-09 20:51:53 -07:00
Kai Backman
83632c7359 initial morestack support for 5l. still disabled, doesn't work.
R=rsc
APPROVED=rsc
DELTA=245  (167 added, 63 deleted, 15 changed)
OCL=30039
CL=30081
2009-06-08 20:20:35 -07:00
Russ Cox
b7f0580274 move src/runtime -> src/lib/runtime;
hand-edited files.

R=r
DELTA=125  (77 added, 16 deleted, 32 changed)
OCL=30001
CL=30008
2009-06-06 22:04:50 -07:00
Kai Backman
97fe55720d Change 5l to use Biobufs for IO.
R=rsc
APPROVED=rsc
DELTA=132  (16 added, 45 deleted, 71 changed)
OCL=29468
CL=29497
2009-05-28 07:41:23 -07:00
Kai Backman
3c7a1ef208 Added automatic detection of system libraries to 5l.
R=rsc
APPROVED=rsc
DELTA=83  (73 added, 3 deleted, 7 changed)
OCL=29276
CL=29382
2009-05-26 12:14:55 -07:00
Kai Backman
7943556970 Added enough arm related scaffolding to create a simple
hello.c program linking against the runtime.

R=rsc
APPROVED=rsc
DELTA=178  (175 added, 0 deleted, 3 changed)
OCL=29283
CL=29380
2009-05-26 11:18:42 -07:00
Kai Backman
eac5db7f4c Copied 8g/6g into 5g. Used sharp tools to coax a .5 file out
of 5g. 5l balks at the output and running 5g with -S shows
the true extent of the disaster. Still, better than
yesterday. Maybe.

Tested on the canonical:

package main
func main() {
}

R=rsc
APPROVED=rsc
DELTA=4182  (4181 added, 0 deleted, 1 changed)
OCL=27601
CL=28175
2009-05-01 13:21:53 -07:00
Kai Backman
35a775d045 Fixed optab to support SWI with long constant (the mode used
for linux system calls).

R=rsc
APPROVED=rsc
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=27325
CL=27328
2009-04-10 16:44:01 -07:00
Kai Backman
4e1896a1b5 Adding ARM elf support to the 5l linker.
R=rsc
APPROVED=rsc
DELTA=312  (312 added, 0 deleted, 0 changed)
OCL=27133
CL=27326
2009-04-10 16:35:36 -07:00
Kai Backman
99cc2fee81 This is really two changes in one but given interdependencies
and expected review latency I needed to combine the CLs.

1. Made the 5* toolpath build using the go build
   system. Hooked the subdirectories to clean.bash but added a
   separate make5.bash for now. Minor massage to make the code
   more similar to the current structure of 6c/6a/6l.

2. Change all references from long to int32 in line with
   similar change for the other toolchains.

The end result is that 5c, 5a and 5l can now be compiled and
the executables start up properly. Haven't thrown any input at
them yet.

R=rsc
APPROVED=rsc
DELTA=1052  (392 added, 328 deleted, 332 changed)
OCL=26757
CL=26761
2009-03-25 16:31:38 -07:00
Kai Backman
db3a21d7c6 5a 5c 5l from inferno distribution
R=rsc
APPROVED=rsc
DELTA=19042  (19042 added, 0 deleted, 0 changed)
OCL=26268
CL=26270
2009-03-13 15:03:07 -07:00