- 23 Jan, 2015 5 commits
-
-
Russ Cox authored
Change-Id: I97bbf7a276c8f99554f0e3a9bcc8d3792a5e0f65 Reviewed-on: https://go-review.googlesource.com/3221Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
Add main.go, the simple driver for the assembler, and the subdirectory internal/asm, which contains the parser and instruction generator. It's likely that much of the implementation is superstition, or at best experimental phenomenology, but it does generate working binaries. Change-Id: I322a9ae8a20174b6693153f30e39217ba68f8032 Reviewed-on: https://go-review.googlesource.com/3196Reviewed-by:
Russ Cox <rsc@golang.org>
-
Rob Pike authored
Add the lexing code for the new portable assembler. It is internal to the assembler, so lives in a subdirectory of cmd/asm/internal. Its only new dependency is the flags package for the assembler, so add that too; it's trivial. That package manages the command-line flags in a central place. The lexer builds on text/scanner to lex the input, including doing a Plan 9-level implementation of the C preprocessor. Change-Id: I262e8717b8c797010afaa5051920839906c0dd19 Reviewed-on: https://go-review.googlesource.com/3195Reviewed-by:
Russ Cox <rsc@golang.org>
-
Rob Pike authored
This simple package holds the definition of the Addr (address) type that represents addresses inside the assembler. It has no dependencies. Change-Id: I7573fd70f1847ef68e3d6b663dc4c39eb2ebf8b3 Reviewed-on: https://go-review.googlesource.com/3193Reviewed-by:
Russ Cox <rsc@golang.org>
-
Rob Pike authored
This package builds the representation of the machine architecture for the new assembler. Almost nothing in it is likely to last but this will get things running. Change-Id: I8edd891f927a81f76d2dbdcd7484b9c87ac0fb2e Reviewed-on: https://go-review.googlesource.com/3194Reviewed-by:
Russ Cox <rsc@golang.org>
-
- 22 Jan, 2015 1 commit
-
-
Russ Cox authored
cmd/internal/obj reconverted using rsc.io/c2go rev 40275b8. All Prog*s need Ctxt field set so that the printer can tell which architecture the Prog belongs to. Use ctxt.NewProg consistently for this. Change-Id: Ic981b3d68f24931ffae74a772e83a3dc2fdf518a Reviewed-on: https://go-review.googlesource.com/3152Reviewed-by:
Rob Pike <r@golang.org>
-
- 21 Jan, 2015 18 commits
-
-
Russ Cox authored
For new assembler, reconvert using rsc.io/c2go rev f9db76e. - Removes trailing _ from Go keywords that are exported. - Export regstr as Register, anames[5689] as Anames. Also update clients. Change-Id: I41c8fd2d14490236f548b4aa0ed0b9bd7571d2d7 Reviewed-on: https://go-review.googlesource.com/3151Reviewed-by:
Rob Pike <r@golang.org>
-
David du Colombier authored
The function getgohostos and getgohostarch were declared in include/libc.h in CL 3042. Change-Id: Ib4ff5182cb71cc79a99663ce727fa4c28d15d7ad Reviewed-on: https://go-review.googlesource.com/3122Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
David du Colombier authored
The function runcmd was declared in include/libc.h in CL 7523043. Change-Id: I3839b96b2ac0d63e5c2eb4c216710442d0962119 Reviewed-on: https://go-review.googlesource.com/3125Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
When an assembly file must be assembled, cmd/go now runs both (say) 6a and new6a and checks that they write identical output files. This serves as a build-time test that the new assemblers are accurate conversions of the old ones. As long as they are producing identical bytes, there's no need for run-time testing. Once the C conversion is done, we'll throw away the C code and this checking. Change-Id: I0216dad56b7e79011eecd27f1aff4fe79bfe720b Reviewed-on: https://go-review.googlesource.com/3145Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
The change to the bootstrap import conversion is for the a.y files, which use import dot. While we're editing the tool list, add "cmd/dist". Right now 'go install cmd/dist' installs to $GOROOT/bin/dist. (A new bug since cmd/dist has been rewritten in Go. When cmd/dist was a C program, go install cmd/dist just didn't work.) Change-Id: I362208dcfb4ae64c987f60b95dc946829fa506d8 Reviewed-on: https://go-review.googlesource.com/3144Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
These assemblers produce byte-for-byte identical output to the ones written in C. They are primarily a proof that cmd/internal/obj can be used standalone to produce working object files. (The use via objwriter starts by deserializing an already-constructed internal representation, so objwriter does not exercise the code in cmd/internal/obj that creates such a representation from scratch.) Change-Id: I1793d8d010046cfb9d8b4d2d4469e7f47a3d3ac7 Reviewed-on: https://go-review.googlesource.com/3143Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This is the raw output of c2go. It needs fixes to make it compile. Rather than make c2go do a 100% conversion (like we're doing for liblink and the Go compilers), since this is so trivial I'm going to make the remaining changes by hand in a followup CL. This CL makes the next CL's diffs useful. Also copy unmodified .y files (5a/a.y → new5a/a.y and so on) The converted 6a/lex.c has been written to new6a/lex.go but also to internal/asm/asm.go, because I'm going to factor out some common code rather than convert it four times. Change-Id: I01d5dfd6a9be3ef6191581560bdddd0ac0e8bc58 Reviewed-on: https://go-review.googlesource.com/3142Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
Using rsc.io/c2go repo revision 60c9302. - Export a few symbols needed by assemblers. - Implement Getgoroot etc directly, and add Getgoversion. - Removes dependency on Go 1.4 go/build. - Change magic history name <no name> to <pop> The <pop> change requires adjustment to the liblink serializer. Change-Id: If5fb52ac9e91d50805263070b3fc5cc05d8b7632 Reviewed-on: https://go-review.googlesource.com/3141Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
cmd/internal/obj needs information about the default values of GOROOT, GOARM, GOEXPERIMENT, Version, and so on. It cannot ask package runtime, because during bootstrap package runtime comes from Go 1.4. So it must have its own copy. Change-Id: I73d3e75a3d47210b3184a51a810ebb44826b81e5 Reviewed-on: https://go-review.googlesource.com/3140Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
This CL enables moving the bulk of the object writing code out of liblink and into translated Go libraries in cmd/internal/obj, but it does not do the move. This CL introduces two new environment variables, $GOOBJ and $GOOBJWRITER, but both will be deleted along with the rest of the liblink C code. The default behavior of a build is unchanged by this CL: the C version of liblink uses the C object layout and writing code. If $GOOBJ=1, liblink invokes go tool objwriter instead. If $GOOBJ=2, liblink does its own layout and then invokes go tool objwriter, which checks that it gets the same answer. That is, in $GOOBJ=2 mode, both the C and the Go version of the code run, and the operation fails if the two produce different answers. This provides a very strong check that the translation is working correctly. Change-Id: I56ab49b07ccb2c7b81085f1d6950131047c6aa3c Reviewed-on: https://go-review.googlesource.com/3048Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
New code but nothing interesting. It's nearly all parsing code for the format written by liblink. The interesting part is the call to obj.Writeobjdirect, which is the Go translation of the C liblink writeobjdirect function. Change-Id: I2e9e755e7a3c999302e2ef2c7475c0af9c5acdd2 Reviewed-on: https://go-review.googlesource.com/3047Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This CL adds the real cmd/internal/obj packages. Collectively they correspond to the liblink library. The conversion was done using rsc.io/c2go's run script at rsc.io/c2go repo version 706fac7. This is not the final conversion, just the first working draft. There will be more updates, but this works well enough to use with go tool objwriter and pass all.bash. Change-Id: I9359e835425f995a392bb2fcdbebf29511477bed Reviewed-on: https://go-review.googlesource.com/3046Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Executing 'clean -i std' removes installed Go programs, including the toolchain binaries we need for building. It's not clear why the 'clean -i std' is here in the first place. cmd/dist just removed the entire pkg tree, so everything is new. The only reason for 'clean -i std' would be if you don't trust that dist compiled the packages properly. If that's true for some reason, we can fix cmd/dist, or add -a to the install commands that follow. Perhaps clean -i std should not remove tools, or perhaps std should not expand to any tools. Not sure. Also remove banner from make.bat and make.rc that was already removed from make.bash. cmd/dist prints it now. Also fix array size error in liblink/objfile.c. Fixes dev.cc build. Change-Id: I60855e001a682efce55ad9aa307a8f3ee47f7366 Reviewed-on: https://go-review.googlesource.com/3100Reviewed-by:
Russ Cox <rsc@golang.org>
-
Russ Cox authored
This doesn't actually use objwriter for any real work. It's just to check that objwriter is available. The real work will be moved once the bootstrapping mechanisms are working. Change-Id: I5f41c8910c4b11b9d80cb0b0847ff9cb582fc2be Reviewed-on: https://go-review.googlesource.com/3045Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Bootstrap the Go parts of the Go toolchain using Go 1.4, as described in https://golang.org/s/go15bootstrap. The first Go part of the Go toolchain will be cmd/objwriter, but for now that's just an empty program to test that this new code works. Once the build dashboard is okay with this change, we'll make objwriter a real program depended upon by the build. Change-Id: Iad3dce675571cbdb5ab6298fe6f98f53ede47d5c Reviewed-on: https://go-review.googlesource.com/3044Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
cmd/internal/obj is the name for the Go translation of the C liblink library. cmd/objwriter is the name of a Go binary that runs liblink's writeobj function. When the bulk of liblink has been converted to Go but the assemblers and compilers are still written in C, the C writeobj will shell out to the Go objwriter to actually write the object file. This lets us manage the transition in smaller pieces. The objwriter tool is purely transitional. It will not ship in any release (enforced in cmd/dist). Adding a dummy program and some dummy imports here so that we can work on the bootstrap mechanisms that will be necessary to build it. Once the build process handles objwriter properly, we'll work on the actual implementation. Change-Id: I675c818b3a513c26bb91c6dba564c6ace3b7fcd4 Reviewed-on: https://go-review.googlesource.com/3043Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Needed for invoking a Go subprocess in the C code. The Go tools live in $GOROOT/pkg/tool/$GOHOSTARCH_$GOHOSTOS. Change-Id: I961b6b8a07de912de174b758b2fb87d77080546d Reviewed-on: https://go-review.googlesource.com/3042Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The argument is unused in the C code but will be used in the Go translation, because the Prog holds information needed to invoke the right meaning of %A in the ctxt->diag calls in vaddr. Change-Id: I501830f8ea0e909aafd8ec9ef5d7338e109d9548 Reviewed-on: https://go-review.googlesource.com/3041Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 19 Jan, 2015 15 commits
-
-
Evan Kroske authored
Close the pipe for the body of a request when it is aborted and close all pipes when child.serve terminates. Fixes #6934 Change-Id: I1c5e7d2116e1ff106f11a1ef8e99bf70cf04162a Reviewed-on: https://go-review.googlesource.com/1923Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Reported via unsupported Github pull request: #9299 Change-Id: I0e98dd68cbc68fcc6bcec15c5b33f20b6a861ec6 Reviewed-on: https://go-review.googlesource.com/3025Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Gerrand authored
This dashboard is no longer in use, and doesn't work with Gerrit. Change-Id: Ib7c367dcad97322566610157b15e23db5bec58ff Reviewed-on: https://go-review.googlesource.com/3028Reviewed-by:
David Symonds <dsymonds@golang.org>
-
Russ Cox authored
Can't use bgwait, both because it can only be used from one goroutine at a time and because it ends up queued behind all the other pending commands. Use a separate signaling mechanism so that we can notice we're dying sooner. Change-Id: I8652bfa2f9bb5725fa5968d2dd6a745869d01c01 Reviewed-on: https://go-review.googlesource.com/3010Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The code in mfinal.go is moved from malloc*.go and mgc*.go and substantially unchanged. The code in mbitmap.go is also moved from those files, but cleaned up so that it can be called from those files (in most cases the code being moved was not already a standalone function). I also renamed the constants and wrote comments describing the format. The result is a significant cleanup and isolation of the bitmap code, but, roughly speaking, it should be treated and reviewed as new code. The other files changed only as much as necessary to support this code movement. This CL does NOT change the semantics of the heap or type bitmaps at all, although there are now some obvious opportunities to do so in followup CLs. Change-Id: I41b8d5de87ad1d3cd322709931ab25e659dbb21d Reviewed-on: https://go-review.googlesource.com/2991Reviewed-by:
Keith Randall <khr@golang.org>
-
Jongmin Kim authored
Change-Id: Ia8d4459a39425583027f00410fe17b9686b768db Reviewed-on: https://go-review.googlesource.com/3026Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
I also added new comments at the top of mbarrier.go, but the rest of the code is just copy-and-paste. Change-Id: Iaeb2b12f8b1eaa33dbff5c2de676ca902bfddf2e Reviewed-on: https://go-review.googlesource.com/2990Reviewed-by:
Austin Clements <austin@google.com>
-
Russ Cox authored
Otherwise, if you mistakenly refer to an undeclared 'shift' variable, you get 52. Change-Id: I845fb29f23baee1d8e17b37bde0239872eb54316 Reviewed-on: https://go-review.googlesource.com/2909Reviewed-by:
Austin Clements <austin@google.com>
-
Shenghou Ma authored
Fixes #9632. Change-Id: Ic4d7cad8ff62023c1beecd2d62e48eb9258f5306 Reviewed-on: https://go-review.googlesource.com/3013Reviewed-by:
Rob Pike <r@golang.org>
-
Mikio Hara authored
As shown in #9395, inaccurate implementation would be a cause of parsing IPv4 header twice and corrupted upper-layer message issues. Change-Id: Ia1a042e7ca58ee4fcb38fe9ec753c2ab100592ca Reviewed-on: https://go-review.googlesource.com/3001Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The function is here ONLY for symmetry with package bytes. This function should be used ONLY if it makes code clearer. It is not here for performance. Remove any performance benefit. If performance becomes an issue, the compiler should be fixed to recognize the three-way compare (for all comparable types) rather than encourage people to micro-optimize by using this function. Change-Id: I71f4130bce853f7aef724c6044d15def7987b457 Reviewed-on: https://go-review.googlesource.com/3012Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
cmd/dist now requires $GOROOT to be set explicitly. Set it when invoking via 'go tool dist' so that users are unaffected. Also, change go tool -n to drop trailing space in output for 'go tool -n <anything>'. Change-Id: I9b2c020e0a2f3fa7c9c339fadcc22cc5b6cb7cac Reviewed-on: https://go-review.googlesource.com/3011Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Change-Id: I3f6ba5591130b2c4762d33bd4553220765ad9fc5 Reviewed-on: https://go-review.googlesource.com/2996Reviewed-by:
Andrew Gerrand <adg@golang.org>
-
Michael Matloob authored
gofmt inserts a blank line line between const and var declarations Change-Id: I3f2ddbd9e66a74eb3f37a2fe641b93820b02229e Reviewed-on: https://go-review.googlesource.com/3022Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I58d66a7fc25b172baf0df6b634e9e2cc792967d5 Reviewed-on: https://go-review.googlesource.com/3021Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 18 Jan, 2015 1 commit
-
-
Bill Thiede authored
This manually reverts 555da73c from #6372 which implies a minimum FreeBSD version of 8-STABLE. Updates docs to mention new minimum requirement. Fixes #9627 Change-Id: I40ae64be3682d79dd55024e32581e3e5e2be8aa7 Reviewed-on: https://go-review.googlesource.com/3020Reviewed-by:
Minux Ma <minux@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-