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

121 Commits

Author SHA1 Message Date
Kai Backman
68d5c51287 fix conditional branch instructions for unsigned ints and
float. fix sgen endianess in sgen character copying.

        go/test: passes 97% (336/345)

R=rsc
http://go/go-review/1015007
2009-10-24 22:47:25 -07:00
Kai Backman
f860bc0f4e fixed len/cap for chan. disable gc for now.
go/test: passes 93% (323/345)

R=rsc
http://go/go-review/1015006
2009-10-23 20:31:03 -07:00
Kai Backman
942d6590d9 one more argsize fix. we were copying with the correct
alignment but not enough (duh).

R=rsc
APPROVED=rsc
DELTA=16  (13 added, 0 deleted, 3 changed)
OCL=36020
CL=36024
2009-10-23 11:03:16 -07:00
Kai Backman
a9e03ae52a fix broken code produced for ominus
go/test: passes 89% (308/345)

R=rsc
APPROVED=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=36005
CL=36021
2009-10-23 10:58:29 -07:00
Kai Backman
03bbfe6724 fix off by 4 in newproc arg copying.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
2009-10-22 13:31:52 -07:00
Kai Backman
dde4090372 removed tempalloc/tempfree and replaced with tempname
go/test: passes 88% (304/345)

R=rsc
APPROVED=rsc
DELTA=67  (3 added, 54 deleted, 10 changed)
OCL=35910
CL=35910
2009-10-19 22:47:25 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Kai Backman
b4896b496e function literals
go/test: passes 86% (297/343)

R=rsc
APPROVED=rsc
DELTA=14  (10 added, 1 deleted, 3 changed)
OCL=35881
CL=35884
2009-10-19 12:44:08 -07:00
Kai Backman
8037e3ba5e fix arm build, add 64 bit cgen_asop
R=rsc
APPROVED=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=35845
CL=35845
2009-10-16 12:02:14 -07:00
Kai Backman
4f7aa31862 fix minor typo in float conversions
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35820
CL=35820
2009-10-15 22:30:57 -07:00
Kai Backman
545dbd810c fix OINDEX address generation, leftover misunderstanding about
how scale works on amd64/386

go/test: passes 85% (294/342)

R=rsc
APPROVED=rsc
DELTA=27  (26 added, 1 deleted, 0 changed)
OCL=35815
CL=35818
2009-10-15 22:16:31 -07:00
Kai Backman
222a15c840 test/64bit.go passes but doesn't generate properly yet.
R=rsc
APPROVED=rsc
DELTA=235  (98 added, 38 deleted, 99 changed)
OCL=35789
CL=35813
2009-10-15 19:41:51 -07:00
Kai Backman
101f7cbd61 changed 5c 64 bit word ordering to little endian so it matches
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.

go/test: passes 83% (287/342)

R=rsc
APPROVED=rsc
DELTA=156  (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
2009-10-12 13:35:28 -07:00
Kai Backman
6d0983ae46 64bit and float code generation. fmt compiles but
reflect is broken so fmt doesn't work.

go/test: passes 83% (285/342)

R=rsc
APPROVED=rsc
DELTA=415  (240 added, 29 deleted, 146 changed)
OCL=35576
CL=35588
2009-10-11 20:01:11 -07:00
Kai Backman
6084dcdd07 floating point calc, added a few more packages that pass
go/test: passes 80% (274/340)

R=rsc
APPROVED=rsc
DELTA=61  (59 added, 0 deleted, 2 changed)
OCL=35506
CL=35517
2009-10-09 07:37:49 -07:00
Kai Backman
116beb2653 - moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)
- 64 bit OMINUS
- added bunch of missing arm syscalls

R=rsc
APPROVED=rsc
DELTA=203  (189 added, 3 deleted, 11 changed)
OCL=35412
CL=35414
2009-10-06 16:39:38 -07:00
Kai Backman
620ec45c5f cleaned up cgen() to be a bit more straightforward.
R=rsc
APPROVED=rsc
DELTA=104  (46 added, 56 deleted, 2 changed)
OCL=35392
CL=35394
2009-10-06 14:48:39 -07:00
Kai Backman
5afce0ca85 64 bit cmp and some sgen tweaks
go/test: passes 75% (256/339)

R=rsc
APPROVED=rsc
DELTA=142  (53 added, 4 deleted, 85 changed)
OCL=35367
CL=35375
2009-10-06 09:47:46 -07: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
Kai Backman
3e5a817d07 a few more code generation bugs and an interface alignment issue.
go/test: passes 74% (251/339)

R=rsc
APPROVED=rsc
DELTA=40  (34 added, 0 deleted, 6 changed)
OCL=35254
CL=35275
2009-10-02 09:06:51 -07:00
Kai Backman
57f834aeff generate float registers correctly.
go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243
2009-10-01 13:52:55 -07:00
Kai Backman
8fd53f4754 cgen_asop sudoaddable
R=rsc
APPROVED=rsc
DELTA=14  (4 added, 0 deleted, 10 changed)
OCL=35190
CL=35210
2009-10-01 06:50:59 -07:00
Kai Backman
a1b4796394 fixed a few calls to gcmp and some really bothched OINDEX code
(how did that happen?)

go/test: passes 70% (238/339)

R=rsc
APPROVED=rsc
DELTA=18  (10 added, 0 deleted, 8 changed)
OCL=35185
CL=35188
2009-09-30 18:56:37 -07:00
Kai Backman
399d23d4f4 load binary op arguments into registers
go/test: passes 69% (237/339)

R=rsc
APPROVED=rsc
DELTA=12  (3 added, 9 deleted, 0 changed)
OCL=35178
CL=35180
2009-09-30 14:28:18 -07:00
Kai Backman
187cc1eb49 fix munging of pointer.
go/test: passes 69% (235/339)

R=rsc
APPROVED=rsc
DELTA=5  (4 added, 1 deleted, 0 changed)
OCL=35107
CL=35109
2009-09-29 16:07:59 -07:00
Kai Backman
8ccf8240f4 fixed alignment issue resulting from confusion around the
meaning of out args.

go/test: passes 68% (231/339)

R=rsc
APPROVED=rsc
DELTA=13  (7 added, 0 deleted, 6 changed)
OCL=35072
CL=35080
2009-09-29 07:27:49 -07:00
Kai Backman
24bfaaf07a - added gcmp for proper ACMP generation, changed all call
sites plus optimized constant code a bit (one less register
  used).
- changed conditional branches, might need a re-tweak later
- gave up on agen OINDEX and copied/fixed the version in 8g

go/test: passes 66% (225/339)

R=rsc
APPROVED=rsc
DELTA=148  (67 added, 32 deleted, 49 changed)
OCL=35040
CL=35055
2009-09-28 15:40:13 -07:00
Kai Backman
8ce5f6e14a fix bad code generation.
go/test: passes 64% (215/337) tests

metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.

R=rsc
APPROVED=rsc
DELTA=228  (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899
2009-09-22 13:13:23 -07:00
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
2c7ec3d861 fix 5g -S and -g output
R=rsc
APPROVED=rsc
DELTA=115  (93 added, 14 deleted, 8 changed)
OCL=34798
CL=34802
2009-09-18 12:47:44 -07:00
Kai Backman
020dbcd4df revert setting of name from type. already set correctly.
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=34799
CL=34801
2009-09-18 12:47:25 -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
Kai Backman
6b0bd43fe4 fix code generation of CMP to use registers properly. also fix
one case of uninitialized memory and some output.

R=rsc
APPROVED=rsc
DELTA=73  (43 added, 1 deleted, 29 changed)
OCL=34743
CL=34772
2009-09-17 23:07:52 -07:00
Kai Backman
803a73c431 floating point constants and symbol export fix.
R=rsc
APPROVED=rsc
DELTA=16  (0 added, 1 deleted, 15 changed)
OCL=34753
CL=34769
2009-09-17 19:24:07 -07:00
Russ Cox
cb49a999d1 move static init code from 6g into gc.
hook up to 8g and 5g too.

R=ken
OCL=34768
CL=34768
2009-09-17 19:15:54 -07:00
Kai Backman
ff196fbde7 patch in proper branch address in zaddr output
R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664
2009-09-15 16:14:49 -07:00
Kai Backman
4c952153aa use register intermediate
R=rsc
APPROVED=rsc
DELTA=21  (7 added, 5 deleted, 9 changed)
OCL=34607
CL=34663
2009-09-15 16:12:47 -07:00
Russ Cox
1a0860b93f make 5g, 8g build again by disabling init code.
R=ken
OCL=34604
CL=34604
2009-09-14 14:27:19 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Rob Pike
d4903abeae use %L in listings so we see source line number in easy format
R=ken
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=34309
CL=34311
2009-09-03 10:24:38 -07:00
Kai Backman
ee31157e16 64 bit lsh, sub, and/or/eor. some placeholder files in syscall and os.
R=rsc
APPROVED=rsc
DELTA=204  (139 added, 0 deleted, 65 changed)
OCL=34009
CL=34025
2009-08-28 07:23:24 -07:00
Russ Cox
89f69bb3be gc: handle iface == nil in back end
R=ken
OCL=33778
CL=33781
2009-08-24 15:20:37 -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
Kai Backman
f50e7b156e mostly 64 bit support.
- fixed a number of places where we tried to allocate 64bit
  regs. added honeypot in regalloc to catch these in the future.
- implemented quad copying in sgen
- cgen64.c, add, mul
- clearfat done
- D_REGREG output from 5g (linker already knew about them)
- gmove done
- optoas almost done, last bit probably not needed
- D_SHIFT support in list.c

R=rsc
APPROVED=rsc
DELTA=963  (711 added, 112 deleted, 140 changed)
OCL=33619
CL=33688
2009-08-21 16:29:19 -07:00
Kai Backman
8811896597 more work on adding in pieces. fixed my bad assumptions about
signed and unsigned integer conversions.

R=rsc
APPROVED=rsc
DELTA=398  (40 added, 230 deleted, 128 changed)
OCL=33546
CL=33569
2009-08-19 20:17:09 -07:00
Kai Backman
8e96b45fd6 genembedtramp for arm
R=rsc
APPROVED=rsc
DELTA=104  (0 added, 33 deleted, 71 changed)
OCL=33531
CL=33535
2009-08-19 13:57:11 -07:00
Kai Backman
382a19c3de pkg/sort compiling and some progress on syscall. mostly
re-enabling and massaging code.

R=rsc
APPROVED=rsc
DELTA=2496  (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
2009-08-18 19:20:33 -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
Kai Backman
e7acb5df07 fix runtime and compile regression
R=rsc
APPROVED=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=33434
CL=33452
2009-08-18 07:14:25 -07:00
Russ Cox
a121410541 make Syms smaller.
collapse a lot of duplication in dcl.c
switch to NodeList* from Dcl*

R=ken
OCL=32770
CL=32770
2009-08-04 22:59:23 -07:00
Russ Cox
ff3a73b407 typechecking checkpoint.
started to move typechecking to another file.
can build entire tree still, but lots of work
is duplicated.  much to clean up.

R=ken
OCL=32536
CL=32543
2009-07-30 16:53:08 -07:00
Russ Cox
517e3457cc fix build on amd64
R=ken
OCL=32521
CL=32521
2009-07-30 11:03:58 -07:00
Russ Cox
189153ed13 fix error that gcc thinks is a warning
R=ken
OCL=32264
CL=32386
2009-07-28 17:02:05 -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
30228a3bc6 avoid register computing len(x), cap(x)
for slice or string x.

R=ken
OCL=32249
CL=32249
2009-07-27 15:55:27 -07:00
Russ Cox
e52e9ca82e another step toward eliminating forward declarations.
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.

the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).

delete dead chanrecv3 code.

delay construction of func types.

R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Kai Backman
60d223a418 added missing pieces required by reflection
R=rsc
APPROVED=rsc
DELTA=61  (40 added, 18 deleted, 3 changed)
OCL=31502
CL=31580
2009-07-13 22:06:28 -07:00
Kai Backman
0e2cce70cb tiny naming cleanup
R=rsc
APPROVED=rsc
DELTA=17  (0 added, 0 deleted, 17 changed)
OCL=31503
CL=31579
2009-07-13 22:04:24 -07:00
Kai Backman
092d6290d0 fixed typo where output arguments where pushed on to R0
instead of SP.

R=rsc
APPROVED=rsc
DELTA=13  (3 added, 7 deleted, 3 changed)
OCL=31488
CL=31501
2009-07-12 22:12:33 -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
cd4aab62e3 sudoaddable odot
R=rsc
APPROVED=rsc
DELTA=7  (0 added, 1 deleted, 6 changed)
OCL=31189
CL=31191
2009-07-06 09:23:41 -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
a7735f8a16 fixed bug that cause -g to segfault
R=rsc
APPROVED=rsc
DELTA=48  (30 added, 16 deleted, 2 changed)
OCL=31152
CL=31187
2009-07-06 06:36:25 -07:00
Kai Backman
b2871b727e working on bgen
- removed smallint optimizations
- lifted raddr from 5c
- add back %R, was used in gc/* causing -g to crash
- changed naddr OREGISTER to emit D_REG instead of D_OREG

R=rsc
APPROVED=rsc
DELTA=74  (38 added, 28 deleted, 8 changed)
OCL=30799
CL=30822
2009-06-26 22:04:30 -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
190b5c9ad2 fixes to 5g object file generation. arm specific regalloc.
R=rsc
APPROVED=rsc
DELTA=976  (164 added, 237 deleted, 575 changed)
OCL=30705
CL=30743
2009-06-25 11:01:17 -07:00
Russ Cox
0aef57e37f fix a 6g crash after type errors.
do not bother warning about marks left
on stack after syntax errors.

leave OCONV nodes in tree to avoid type errors
arising from multiple walks.

R=ken
OCL=30639
CL=30662
2009-06-23 15:30:59 -07:00
Kai Backman
1faf06eabf make 5g use 1 byte per binary asm statement.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 4 deleted, 0 changed)
OCL=30110
CL=30112
2009-06-09 11:34:35 -07:00
Kai Backman
25ac4d07a2 Rolling galign back to 32 bit.
R=rsc
APPROVED=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=29532
CL=29917
2009-06-04 21:11:55 -07:00
Kai Backman
63e1b714de Rebooted 5g effort from 6g. Tons of minor fixes and tweaks to
get the code going.

R=rsc
APPROVED=rsc
DELTA=4752  (1723 added, 948 deleted, 2081 changed)
OCL=29403
CL=29530
2009-05-28 14:25:54 -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