Skip to content
Permalink
Browse files

all: merge dev.cc (a91c2e0) into master

This change deletes the C implementations of
the Go compiler and assembler from the master branch.

The Go implementations are a bit slower right now,
due mainly to garbage generated by taking addresses
of stack variables all over the place (it was C code,
after all). That will be cleaned up (mechanically) over the
next week or so, and things will get faster.

Change-Id: I66b2b3477aec8835f9960d0798f5752dcd98d08f
  • Loading branch information
rsc committed Feb 23, 2015
2 parents bceb18e + a91c2e0 commit b986f3e3b54499e63903405c90aa6a0abe93ad7a
Showing 346 changed files with 129,643 additions and 93,009 deletions.
@@ -26,15 +26,14 @@ misc/cgo/life/run.out
misc/cgo/stdio/run.out
misc/cgo/testso/main
misc/dashboard/builder/builder
src/cmd/?a/y.output
src/liblink/anames?.c
src/cmd/cc/y.output
src/cmd/*/y.output
src/cmd/cgo/zdefaultcc.go
src/cmd/dist/dist.dSYM
src/cmd/gc/mkbuiltin1
src/cmd/gc/opnames.h
src/cmd/gc/y.output
src/cmd/go/zdefaultcc.go
src/cmd/internal/obj/zbootstrap.go
src/go/doc/headscan
src/runtime/mkversion
src/runtime/zaexperiment.h
@@ -23,6 +23,7 @@ testing/quick: support generation of arrays (https://golang.org/cl/3865)

Tools:

cmd/go: std wildcard now excludes commands in main repo (https://golang.org/cl/5550)
cmd/vet: better validation of struct tags (https://golang.org/cl/2685)
cmd/ld: no longer record build timestamp in Windows PE file header (https://golang.org/cl/3740)

@@ -34,3 +35,21 @@ strconv: optimize decimal to string conversion (https://golang.org/cl/2105)
math/big: faster assembly kernels for amd64 and 386 (https://golang.org/cl/2503, https://golang.org/cl/2560)
math/big: faster "pure Go" kernels for platforms w/o assembly kernels (https://golang.org/cl/2480)

Assembler:

ARM assembly syntax has had some features removed.

- mentioning SP or PC as a hardware register
These are always pseudo-registers except that in some contexts
they're not, and it's confusing because the context should not affect
which register you mean. Change the references to the hardware
registers to be explicit: R13 for SP, R15 for PC.
- constant creation using assignment
The files say a=b when they could instead say #define a b.
There is no reason to have both mechanisms.
- R(0) to refer to R0.
Some macros use this to a great extent. Again, it's easy just to
use a #define to rename a register.

Also expression evaluation now uses uint64s instead of signed integers and the
precedence of operators is now Go-like rather than C-like.
@@ -292,6 +292,8 @@ extern char* getgoversion(void);
extern char* getgoarm(void);
extern char* getgo386(void);
extern char* getgoextlinkenabled(void);
extern char* getgohostos(void);
extern char* getgohostarch(void);

extern char* mktempdir(void);
extern void removeall(char*);
@@ -241,6 +241,7 @@ struct Prog
uchar ft; // oclass cache
uchar tt; // oclass cache
uchar isize; // amd64, 386
uchar printed;

char width; /* fake for DATA */
char mode; /* 16, 32, or 64 in 6l, 8l; internal use in 5g, 6g, 8g */
@@ -303,6 +304,7 @@ struct LSym
uchar localentry; // ppc64: instrs between global & local entry
uchar seenglobl;
uchar onlist; // on the textp or datap lists
uchar printed;
int16 symid; // for writing .5/.6/.8 files
int32 dynid;
int32 sig;
@@ -458,6 +460,7 @@ struct Hist
char* name;
int32 line;
int32 offset;
uchar printed;
};

struct Plist
@@ -14,6 +14,10 @@ char* getgoversion(void);
char* getgoarm(void);
char* getgo386(void);
char* getgoextlinkenabled(void);
char* getgohostos(void);
char* getgohostarch(void);

int runcmd(char**);

void flagcount(char*, char*, int*);
void flagint32(char*, char*, int32*);
@@ -1,7 +1,7 @@
#include "textflag.h"

TEXT cas<>(SB),NOSPLIT,$0
MOVW $0xffff0fc0, PC
MOVW $0xffff0fc0, R15 // R15 is PC

TEXT ·RewindAndSetgid(SB),NOSPLIT,$-4-0
// Save link register
@@ -10,9 +10,23 @@ usr src=../misc/nacl/testdata
go src=..
src
cmd
asm
internal
asm
testdata
+
internal
objfile
objfile.go
rsc.io
arm
armasm
testdata
+
x86
x86asm
testdata
+
gofmt
gofmt.go
gofmt_test.go

This file was deleted.

This file was deleted.

0 comments on commit b986f3e

Please sign in to comment.